1.0.3 • Published 3 years ago

stringprocessor v1.0.3

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

Lightweight package for processing strings in Javascript

license npm version

Installation

// with npm
npm install stringprocessor

// with yarn
yarn add stringprocessor

Functionalities

  • StringProc: Methods returns a string literal
  • StringToObject: Methods require a key value and returns an object key-value pair

Current list of methods and usage:

  • lowercase
  • uppercase
  • capitalize
  • deletespaces

Usage

const {StringProc, StringToObject} = require('stringprocessor')

//StringProc only takes in a single argument

# console.log(StringProc.capitalize('california')) 
// returns 'California'

# console.log(StringProc.deletespaces('cali f ornia') 
// returns 'california'

# console.log(StringToObject.capitalize('state','california')) 
//returns {state:'California'}

# console.log(StringToObject.deletespaces('state','cali f ornia')) 
//returns {state:'california'}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT licensed.