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

@ject/pipe

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ject/pipe - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

26

dist/index.cjs.js

@@ -5,25 +5,17 @@ 'use strict';

var oneself = require('@ject/oneself');
var nullish = require('@typen/nullish');
const duopipe = (alpha, beta) => {
let a = nullish.nullish(alpha),
b = nullish.nullish(beta);
if (!a && !b) return x => beta(alpha(x));
if (!a) return alpha;
if (!b) return beta;
return oneself.oneself;
if (!alpha) return beta;
if (!beta) return alpha;
return x => beta(alpha(x));
};
const pipemany = (...funcs) => {
var _func;
let l = funcs.length,
func = void 0,
temp = void 0;
let size = funcs.length,
func,
temp;
while (l >= 0) if (func = funcs[l--]) break;
while (size >= 0) if (func = funcs[size--]) break;
while (l >= 0) if (temp = funcs[l--]) func = duopipe(temp, func);
while (size >= 0) if (temp = funcs[size--]) func = duopipe(temp, func);
return (_func = func) !== null && _func !== void 0 ? _func : oneself.oneself;
return func;
};

@@ -30,0 +22,0 @@ const pipe = (...funcs) => {

@@ -1,24 +0,16 @@

import { oneself } from '@ject/oneself';
import { nullish } from '@typen/nullish';
const duopipe = (alpha, beta) => {
let a = nullish(alpha),
b = nullish(beta);
if (!a && !b) return x => beta(alpha(x));
if (!a) return alpha;
if (!b) return beta;
return oneself;
if (!alpha) return beta;
if (!beta) return alpha;
return x => beta(alpha(x));
};
const pipemany = (...funcs) => {
var _func;
let l = funcs.length,
func = void 0,
temp = void 0;
let size = funcs.length,
func,
temp;
while (l >= 0) if (func = funcs[l--]) break;
while (size >= 0) if (func = funcs[size--]) break;
while (l >= 0) if (temp = funcs[l--]) func = duopipe(temp, func);
while (size >= 0) if (temp = funcs[size--]) func = duopipe(temp, func);
return (_func = func) !== null && _func !== void 0 ? _func : oneself;
return func;
};

@@ -25,0 +17,0 @@ const pipe = (...funcs) => {

{
"name": "@ject/pipe",
"version": "0.0.2",
"version": "0.0.3",
"description": "Util for functions",

@@ -17,6 +17,2 @@ "main": "dist/index.cjs.js",

},
"dependencies": {
"@ject/oneself": "^0.0.2",
"@typen/nullish": "^0.1.5"
},
"repository": {

@@ -36,3 +32,3 @@ "type": "git",

"homepage": "https://github.com/hoyeungw/ject#readme",
"gitHead": "010a3b2c7f22f87d6de66d1e7958d2a07ef525a0"
"gitHead": "adaf96f56fe0e1549e5742816fb34faca21eaf51"
}
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