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

fp-sac

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

fp-sac - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

4

changelog.md
# Changelog
## 2.2.0
* +partition
## 2.1.0

@@ -4,0 +8,0 @@

4

decorators.js

@@ -50,7 +50,7 @@ export {

const sequentialalizePromiseCreator = (promiseCreator) => {
let callStack = [];
const callStack = [];
let current;
const callLater = () => {
return promiseCreator(...callStack.shift());
}
};
return (...x) => {

@@ -57,0 +57,0 @@ if (!current) {

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

export { map, curry, firstTruethy };
export { map, curry, firstTruethy, partition };

@@ -48,1 +48,16 @@

/* similar to filter but returns 2 arrays:
The one you would have with filter and another array with rest */
const partition = (mapper, array) => {
const inside = [];
const out = [];
array.forEach(element => {
if (mapper(element)) {
inside.push(element);
} else {
out.push(element);
}
});
return [inside, out];
};
{
"name": "fp-sac",
"version": "2.1.0",
"version": "2.2.0",
"description": "functional primitives and helpers",

@@ -14,4 +14,4 @@ "license": "CC0-1.0",

"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-red": "^1.8.2"
"eslint": "^8.19.0",
"eslint-config-red": "^1.9.1"
},

@@ -18,0 +18,0 @@ "eslintConfig": {

@@ -9,3 +9,3 @@ # fp-sac

```js
import {map, curry, firstTruethy} from "fp-sac";
import {map, curry, firstTruethy, partition} from "fp-sac";
```

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