@hugoalh/more-arraydeprecated

A library/module to provide more ways to handle array.

Usage no npm install needed!

<script type="module">
  import hugoalhMoreArray from 'https://cdn.skypack.dev/@hugoalh/more-array';
</script>

README

[NodeJS] More Array

hugoalh-studio/NodeJS.MoreArray GitHub Language Count GitHub Top Langauge GitHub Repo Size GitHub Code Size GitHub Watcher GitHub Star GitHub Fork

A NodeJS library/module to provide more ways to handle array.

License MIT
Release Latest: ()
Pre: ()
Release (NPM) Latest:
Pre:
Contributor
Issue :
Pull Request :
Code Quality CodeFactor Grade LGTM Alert LGTM Grade

📜 Description

🌟 Feature

  • Provide missed method(s) to handle array.
  • Native support for CommonJS and ECMAScript.

📄 Documentation

For the official documentation, please visit GitHub Repository Wiki.

Getting Started (Excerpt)

NodeJS (>= v10) & NPM (>= v6):

> npm install @hugoalh/more-array

API (Excerpt)

  • concatenate(...items)
  • flatten(item, maximumDepth?)
  • removeDuplicate(item)
  • reverse(item)
  • toObject(item)

Example (Excerpt)

const moreArray = require("@hugoalh/more-array");

let array1 = ["one", "two", "three"];
let array2 = ["one", "two", "three"];
console.log(array1);// ["one", "two", "three"]
console.log(Array.reverse(array1));// ["three", "two", "one"]
console.log(array1);// ["three", "two", "one"]
console.log(array2);// ["one", "two", "three"]
console.log(moreArray.reverse(array2));// ["three", "two", "one"]
console.log(array2);// ["one", "two", "three"]
let array3 = moreArray.concatenate(array1, array2);
console.log(array3);// ["three", "two", "one", "one", "two", "three"]
console.log(moreArray.removeDuplicate(array3));// ["three", "two", "one"]