Detalhes do pacote

manip-array

Nidrux18ISC1.0.2

Make arrays easier to manipulate!

array, arrays, array manipulation, manipulation

readme (leia-me)

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);