JSPM

reduce-extract

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

reduce-extract

Package Exports

  • reduce-extract

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

extract(query) ⏏

Removes items from array which satisfy the query. Modifies the input array, returns the extracted.

Kind: Exported function

Param Type Description
query Array the input array, modified directly
any if an item in the input array passes this test it is removed

Example

> DJs = [
    { name: "Trevor", sacked: true },
    { name: "Mike", sacked: true },
    { name: "Chris", sacked: false },
    { name: "Alan", sacked: false }
]

> a.extract(DJs, { sacked: true })
[ { name: 'Trevor', sacked: true },
  { name: 'Mike', sacked: true } ]

> DJs
[ { name: 'Chris', sacked: false },
  { name: 'Alan', sacked: false } ]

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