New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

filter-arraylike-iterable

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filter-arraylike-iterable - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

23

index.js

@@ -15,2 +15,6 @@ const InmutableArray = require('array-inmutable')

function apply (value) {
return this.ps.every(p => p(value)) ? {value} : undefined
}
Object.defineProperties(FilterArrayLikeIterable.prototype, {

@@ -21,10 +25,17 @@ filter: {

[Symbol.iterator]: {
* value () {
value () {
const self = this
const iterable = this.iterable
const length = iterable.length
const ps = this.ps
for (let i = 0; i < length; ++i) {
const val = iterable[i]
if (ps.every(p => p(val))) {
yield val
let i = 0
return {
next () {
while (i < length) {
const status = apply.call(self, iterable[i])
++i
if (status) {
return status
}
}
return {done: true}
}

@@ -31,0 +42,0 @@ }

{
"name": "filter-arraylike-iterable",
"version": "0.1.3",
"version": "0.1.4",
"description": "array like iterable decorated with filter method",

@@ -33,6 +33,6 @@ "main": "index.js",

"babel-register": "^6.26.0",
"coveralls": "^2.13.1",
"eslint": "^4.5.0",
"npm-check": "^5.4.5",
"nyc": "^11.1.0",
"coveralls": "^3.0.0",
"eslint": "^4.16.0",
"npm-check": "^5.5.2",
"nyc": "^11.4.1",
"pre-commit": "^1.2.2",

@@ -46,4 +46,4 @@ "tap-spec": "^4.1.1",

"dependencies": {
"array-inmutable": "^0.1.0"
"array-inmutable": "^0.1.2"
}
}
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