1. reduce-extract
reduce-extract
reduce-extract
Package: reduce-extract
Created by: 75lb
Last modified: Sun, 26 Jun 2022 09:54:42 GMT
Version: 1.0.0
License: MIT
Downloads: 577,911
Repository: https://github.com/75lb/reduce-extract

Install

npm install reduce-extract
yarn add reduce-extract

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 [email protected]. Documented by jsdoc-to-markdown.

Dependencies

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin