1.4.1 • Published 6 years ago

the-array v1.4.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

the-array

Build Status npm Version JS Standard

Array utility of the-framework

Installation

$ npm install the-array --save

Usage

'use strict'

const {
  uniqueFilter,
  keyPathMap
} = require('the-array')

async function tryExample () {

  console.log(
    ['foo', 'bar', 'foo'].filter(uniqueFilter()) // => ['foo', 'bar']
  )

  console.log(
    [{foo: {bar: 10}}, {foo: {bar: 20}}].map(keyPathMap('foo.bar')) // => [10,20]
  )
}

tryExample().catch((err) => console.error(err))

API Guide

License

This software is released under the MIT License.

Links