0.1.3 • Published 4 years ago

@nazieb/str v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

str

str is a small CLI app for converting strings from and to various formats

Installation

$ npm i -g @nazieb/str

Usage

Available str commands:

base64

Encodes string to base64:

$ str base64 enc some string here 

// will output:
// c29tZSBzdHJpbmcgaGVyZQ==

Decodes base64 string to plain format:

$ str base64 dec c29tZSBzdHJpbmcgaGVyZQ== 

// will output:
// some string here

case

Converts string to different casing.

All available casings are listed on change-case library documentation

$ str case title some string here

// will output
// Some String Here

unix

Convert UNIX timestamp to human readable format, and vice-versa

$ str unix 1567494691

// will output
// 2019-09-03T07:11:31.000Z
$ str unix 2019-09-03 07:11:31

// will output
// 1567494691

Development

Some useful NPM commands during development:

npm build

Transpiles the JS files to compatible version in dist directory with Babel

npm test

Runs the tests inside __tests__ directory using Jest

npm run lint

Runs lint checking using ESLint & Prettier

npm run lint -- --fix

Auto-fix lint errors