tostring

0.0.1 • Public • Published

tostring

Transform stdin strings from the command line

install

$ npm install tostring -g

usage

Reads from stdin and writes to stdout encoding data into a specified type.

  • type - Any type that Buffer accepts
usage: tostring [-nhv] [type]
 
example:
  $ echo abc | tostring hex

options:

  • -n - Do not print the trailing newline character.
  • -h - Output help.
  • -v - Output version.

examples

unicode:

echo -n "\u00bd + \u00bc = \u00be" | to-s utf8
½ + ¼ = ¾

hex:

echo 123 | to-s hex
3132330a

base64:

$ echo -n oh my gah b64 me | to-s base64 -n
b2ggbXkgZ2FoIGI2NCBtZQ==

license

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    59
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    59

Package Sidebar

Install

npm i tostring

Weekly Downloads

50

Version

0.0.1

License

MIT

Last publish

Collaborators

  • werle