1.1.0 • Published 4 years ago
jsmp-infra-adiachenko v1.1.0
Installation
This package will be useful for you if you want to:
- add babel to your project
- find out how to delete files with script from package.json
- use assert for simple testing
Using npm:
$ npm init (fill in all fields)
$ npm i --save-dev jsmp-infra-adiachenko
Usage
const { updateString, updateArray } = require('jsmp-infra-adiachenko');
updateArray
Function which accepts array, other parameter(s) and returns updated array
Examples
updateArray(2,2,3, 4, 3, 5) === 4, 6
updateArray(2) === 'WRONG DATA'
updateArray() === 6
updateString
Function which accepts string, other parameter(s) and returns updated string
Examples
updateString('fred, > BARNEY, & --foo-bar--', 'escape') ==='fred, > BARNEY, & --foo-bar--'
updateString('barney, & pebbles') === 'barneyPebbles'
updateString('fred, > BARNEY, & --foo-bar--') === 'fredBarneyFooBar';
updateString() === 'textText'