Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/musiur/opulib

My first ever node module package. I have added sum array manipulating functions. Sooner I will add more function with latest version. This will be my own Lodash library.
https://github.com/musiur/opulib

javascript nodejs npm

Last synced: 5 days ago
JSON representation

My first ever node module package. I have added sum array manipulating functions. Sooner I will add more function with latest version. This will be my own Lodash library.

Awesome Lists containing this project

README

        

Opulib

Opulib is a pure javascript methods/functions library
These methods can be used in daily works

In order to install the library/package run the command below

```
npm install opulib --save

or,

yarn add opulib --save
```

### Code example

```
import { arrayMethods } from "opulib";

const { eraseAt, insertAt} = arrayMethods;

const testArr = [1, 2, 3, 4, 5];

// we have two parameter: array, index
const erased = eraseAt(testArr, 2);

// we have three parameter: array, index, value
const inserted = insertAt(erased, 2, 3);

console.log("Test Array: ", testArr);

// we have removed 3 from testArr at index of 2
console.log("Erased: ", erased);

// we have added 3 into testArr at index of 2
console.log("Inserted: ", inserted);

```

Thank you.