jsmp-infra-homework-soloviov
v1.0.1
Published
homework node module
Downloads
5
Readme
jsmp-infra-homework-soloviov
##install using npm
npm i --save jsmp-infra-homework-soloviov
##In Node.js:
const jsmp = require('jsmp-infra-homework');
##usage
###jsmp.pull(array, [values])
Removes all given values from array
####Arguments
array (Array): The array to modify.
[values] (...*): The values to remove. ####Returns (Array): Returns array.
####Example:
var array = ['a', 'b', 'c', 'a', 'b', 'c'];
jsmp.pull(array, 'a', 'c');
console.log(array);
// => ['b', 'b']
###jsmp.repeat([string=''], [n=1])
Repeats the given string n times.
####Arguments
[string=''] (string): The string to repeat.
[n=1] (number): The number of times to repeat the string. ####Returns (string): Returns the repeated string.
####Example:
_.repeat('', 3); // => '**'
_.repeat('abc', 2); // => 'abcabc'
_.repeat('abc', 0); // => ''