Skip to content

nazieb/str

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9946c80 · May 21, 2020

History

15 Commits
Aug 14, 2019
May 21, 2020
Aug 14, 2019
Aug 14, 2019
May 21, 2020
Aug 14, 2019
Aug 14, 2019
Sep 6, 2019
May 21, 2020
Sep 3, 2019
May 21, 2020
May 21, 2020
May 21, 2020

Repository files navigation

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

About

Small CLI app to converting strings from and to various formats

Resources

License

Stars

Watchers

Forks

Packages

No packages published