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

cooperative

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cooperative - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

index.js

@@ -1,4 +0,5 @@

module.filter = require('./filter')
module.map = require('./map')
module.forEach = require('./forEach')
module.mapObject = require('./mapObject')
module.exports.filter = require('./filter')
module.exports.map = require('./map')
module.exports.forEach = require('./forEach')
module.exports.mapObject = require('./mapObject')
module.exports.reduce = require('./reduce')
{
"name": "cooperative",
"version": "1.0.0",
"version": "1.0.1",
"description": "cooperative threading versions of map, filter, forEach, etc, suitable for big processing in single-threaded Node.js",

@@ -5,0 +5,0 @@ "main": "inde.js",

@@ -1,2 +0,2 @@

# cooperative
# cooperative [![npm version](https://img.shields.io/npm/v/cooperative.svg)](https://www.npmjs.com/package/cooperative) [![npm](https://img.shields.io/npm/dm/cooperative.svg)](https://www.npmjs.com/package/cooperative) [![Build Status](https://travis-ci.org/featurist/cooperative.svg?branch=master)](https://travis-ci.org/featurist/cooperative)

@@ -7,3 +7,3 @@ Cooperative threading versions of map, filter, forEach, etc, suitable for big processing in single-threaded Node.js.

This module provides common functional primitives like `map`, `filter` and `forEach` but that call `setImmediate` regularly so as not to block other activity. This means you can do large processing and stay responsive.
This module provides common functional primitives like `map`, `filter` and `forEach` but that call `setImmediate` regularly, roughly every 10ms, so as not to block other activity. This means you can do large processing and stay responsive.

@@ -15,3 +15,3 @@ ```js

let results = async cooperative.map([1, 2, 3, ...], (item, index) => {
let results = async cooperative.map(veryLargeArray, (item, index) => {
// some lengthy operation

@@ -24,3 +24,3 @@ })

```js
let mappedResults = await map(array, mapper, options)
let mappedResults = await cooperative.map(array, mapper, options)
```

@@ -35,3 +35,3 @@

```js
let filteredArray = await filter(array, predicate, options)
let filteredArray = await cooperative.filter(array, predicate, options)
```

@@ -46,3 +46,3 @@

```js
await forEach(array, action, options)
await cooperative.forEach(array, action, options)
```

@@ -56,3 +56,3 @@

```js
let reducedResults = await reduce(array, operator, initial, options)
let reducedResults = await cooperative.reduce(array, operator, initial, options)
```

@@ -68,3 +68,3 @@

```js
let mappedObject = await mapObject(object, mapper, options)
let mappedObject = await cooperative.mapObject(object, mapper, options)
```

@@ -71,0 +71,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