manip-array

1.0.2 • Public • Published

manip-array

Make arrays easier to manipulate! 🦾

Installation

npm i manip-array

Usage

.remove(array, value :int :string)

remove a specific string or index from an array

const manipArray = require('manip-array');

let array = ['foo','bar','foobar']
let foo = manipArray.remove(array, 'bar')
let bar = manipArray.remove(array, 2)

.create(string, {method: 'method'})

create an array from a string.

const manipArray = require('manip-array');

let foo = manipArray.create('testing if this works', {method: 'charachter'})
console.log(foo);
methods Returns?
whitespaces String split into array without whitespaces
character All characters to an array

.compact(array)

removes every empty string and or whitespaces inside of an array.

const manipArray = require('manip-array');

let foo = manipArray.create('testing if this works', {method: 'charachter'});
let bar = manipArray.compact(foo);
console.log(bar);

Package Sidebar

Install

npm i manip-array

Weekly Downloads

2

Version

1.0.2

License

ISC

Unpacked Size

3.04 kB

Total Files

3

Last publish

Collaborators

  • nidrux