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

@brandingbrand/standard-compose

Package Overview
Dependencies
Maintainers
98
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brandingbrand/standard-compose - npm Package Compare versions

Comparing version 11.62.0 to 11.63.0

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

# [11.63.0](https://github.com/brandingbrand/shipyard/compare/v11.62.0...v11.63.0) (2022-05-24)
### Features
* **shared-util-std-compose:** validatic pipe definition ([aff179a](https://github.com/brandingbrand/shipyard/commit/aff179ad3a99fd05af81d1ba77a9d5e4239630e2))
# [11.62.0](https://github.com/brandingbrand/shipyard/compare/v11.61.0...v11.62.0) (2022-05-18)

@@ -7,0 +16,0 @@

24

index-esm.js
const applyParam = (...params)=>(fnToApply)=>fnToApply(...params)
;
function branch(...fns) {
/**
*
* @param fns
*/ function branch(...fns) {
return (input)=>fns.map((fn)=>fn(input)

@@ -17,10 +20,17 @@ )

function flow(firstFunction, ...functions) {
return (...params)=>{
return functions.reduce((val, fn)=>fn(val)
, firstFunction(...params));
};
/**
*
* @param firstFunction
* @param functions
*/ function flow(firstFunction, ...functions) {
return (...params)=>functions.reduce((val, fn)=>fn(val)
, firstFunction(...params))
;
}
function pipe(value, ...functions) {
/**
*
* @param value
* @param functions
*/ function pipe(value, ...functions) {
return functions.reduce((val, fn)=>fn(val)

@@ -27,0 +37,0 @@ , value);

@@ -8,3 +8,6 @@ 'use strict';

function branch(...fns) {
/**
*
* @param fns
*/ function branch(...fns) {
return (input)=>fns.map((fn)=>fn(input)

@@ -22,10 +25,17 @@ )

function flow(firstFunction, ...functions) {
return (...params)=>{
return functions.reduce((val, fn)=>fn(val)
, firstFunction(...params));
};
/**
*
* @param firstFunction
* @param functions
*/ function flow(firstFunction, ...functions) {
return (...params)=>functions.reduce((val, fn)=>fn(val)
, firstFunction(...params))
;
}
function pipe(value, ...functions) {
/**
*
* @param value
* @param functions
*/ function pipe(value, ...functions) {
return functions.reduce((val, fn)=>fn(val)

@@ -32,0 +42,0 @@ , value);

{
"name": "@brandingbrand/standard-compose",
"version": "11.62.0",
"version": "11.63.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "typings": "./src/index.d.ts",

@@ -21,1 +21,2 @@ export declare function pipe<A>(a: A): A;

export declare function pipe<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T): T;
export declare function pipe<InputType>(value: InputType, ...functions: Array<(input: InputType) => InputType>): InputType;
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