Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arr-filter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arr-filter

Faster alternative to javascript's native filter method.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

arr-filter NPM version

Faster alternative to javascript's native filter method.

array-filter is pretty popular, but it's tuned to be used in older browsers and it falls back on native .filter() when available, which is much slower. See jsperf results. The functions used in the benchmarks are the top performers, reduced down from 10 or 11 additional functions.

Install with npm

npm i arr-filter --save

Install with bower

bower install arr-filter --save

Run tests

npm test

Usage

var filter = require('arr-filter');

filter(['a', {a: 'b'}, 1, 'b', 2, {c: 'd'}, 'c'], function (ele) {
  return typeof ele === 'string';
});
//=> ['a', 'b', 'c']

Author

Jon Schlinkert

Other javascript/node.js utils

Other projects that I maintain:

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 17, 2015.

Keywords

FAQs

Package last updated on 17 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc