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

@supercharge/collections

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supercharge/collections - npm Package Compare versions

Comparing version 1.12.1 to 1.12.2

6

CHANGELOG.md
# Changelog
## [1.12.2](https://github.com/supercharge/collections/compare/v1.12.1...v1.12.2) - 2020-03-12
### Fixed
- `findSeries` now stops when the first matching item is found
## [1.12.1](https://github.com/supercharge/collections/compare/v1.12.0...v1.12.1) - 2020-03-12

@@ -4,0 +10,0 @@

2

package.json
{
"name": "@supercharge/collections",
"description": "Supercharge collections",
"version": "1.12.1",
"version": "1.12.2",
"author": "Marcus PΓΆhls <marcus@futurestud.io>",

@@ -6,0 +6,0 @@ "bugs": {

@@ -176,5 +176,9 @@ 'use strict'

async findSeries (callback) {
const mapped = await this.mapSeries(callback)
for (const index in this.items) {
const result = await callback(this.items[index], index, this.items)
return this.items.find((_, i) => mapped[i])
if (result) {
return this.items[index]
}
}
}

@@ -195,3 +199,3 @@

if (typeof callback === 'function') {
return this.find(callback)
return this.findSeries(callback)
}

@@ -198,0 +202,0 @@

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