JSPM

reduce-without

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 242370
  • Score
    100M100P100Q224180F
  • License MIT

reduce-without

Package Exports

  • reduce-without

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reduce-without) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

view on npm npm module downloads Build Status Dependency Status js-standard-style

reduce-without

without(toRemove) ⇒ Array

Returns a new array with the same content as the input minus the specified values. It accepts the same query syntax as module:array-tools.where.

Kind: Exported function

Param Type Description
toRemove Array the input array
any | Array.<any> one, or more queries

Example

> a.without([ 1, 2, 3 ], 2)
[ 1, 3 ]

> a.without([ 1, 2, 3 ], [ 2, 3 ])
[ 1 ]

> data = [
    { name: "Dana", age: 30 },
    { name: "Yana", age: 20 },
    { name: "Zhana", age: 10 }
]
> a.without(data, { name: /ana/ })
[]

© 2016 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.