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

@thi.ng/compose

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/compose - npm Package Compare versions

Comparing version 1.3.8 to 1.3.9

119

CHANGELOG.md

@@ -6,3 +6,3 @@ # Change Log

## [1.3.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.7...@thi.ng/compose@1.3.8) (2020-01-26)
## [1.3.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.8...@thi.ng/compose@1.3.9) (2020-02-25)

@@ -15,61 +15,4 @@ **Note:** Version bump only for package @thi.ng/compose

## [1.3.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.6...@thi.ng/compose@1.3.7) (2020-01-24)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.5...@thi.ng/compose@1.3.6) (2019-11-30)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.4...@thi.ng/compose@1.3.5) (2019-11-09)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.3...@thi.ng/compose@1.3.4) (2019-09-21)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.2...@thi.ng/compose@1.3.3) (2019-08-21)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.1...@thi.ng/compose@1.3.2) (2019-07-31)
**Note:** Version bump only for package @thi.ng/compose
## [1.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.0...@thi.ng/compose@1.3.1) (2019-07-12)
**Note:** Version bump only for package @thi.ng/compose
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.5...@thi.ng/compose@1.3.0) (2019-07-07)
### Features

@@ -81,49 +24,4 @@

## [1.2.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.4...@thi.ng/compose@1.2.5) (2019-05-22)
**Note:** Version bump only for package @thi.ng/compose
## [1.2.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.3...@thi.ng/compose@1.2.4) (2019-04-26)
**Note:** Version bump only for package @thi.ng/compose
## [1.2.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.2...@thi.ng/compose@1.2.3) (2019-04-24)
**Note:** Version bump only for package @thi.ng/compose
## [1.2.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.1...@thi.ng/compose@1.2.2) (2019-04-02)
**Note:** Version bump only for package @thi.ng/compose
## [1.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.0...@thi.ng/compose@1.2.1) (2019-03-28)
**Note:** Version bump only for package @thi.ng/compose
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.1.2...@thi.ng/compose@1.2.0) (2019-03-10)
### Features

@@ -134,7 +32,4 @@

# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.0.2...@thi.ng/compose@1.1.0) (2019-02-15)
### Bug Fixes

@@ -144,3 +39,2 @@

### Features

@@ -150,7 +44,4 @@

# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.3.0...@thi.ng/compose@1.0.0) (2019-01-21)
### Build System

@@ -160,3 +51,2 @@

### BREAKING CHANGES

@@ -172,6 +62,4 @@

# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.2.2...@thi.ng/compose@0.3.0) (2018-12-27)
### Bug Fixes

@@ -181,3 +69,2 @@

### Features

@@ -187,6 +74,4 @@

# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.4...@thi.ng/compose@0.2.0) (2018-10-17)
### Features

@@ -196,9 +81,7 @@

<a name="0.1.0"></a>
# 0.1.0 (2018-08-24)
### Features
* **compose:** extract comp() & juxt() to new [@thi](https://github.com/thi).ng/compose package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e))

2

comp.d.ts

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

import { Fn, FnAny } from "@thi.ng/api";
import type { Fn, FnAny } from "@thi.ng/api";
/**

@@ -3,0 +3,0 @@ * Returns the right-to-left composition of given functions. I.e. when

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

import { Fn, Fn0, Fn2, Fn3, Fn4, Fn5, Fn6, Fn7, Fn8 } from "@thi.ng/api";
import type { Fn, Fn0, Fn2, Fn3, Fn4, Fn5, Fn6, Fn7, Fn8 } from "@thi.ng/api";
export declare function complement(f: Fn0<boolean>): Fn0<boolean>;

@@ -3,0 +3,0 @@ export declare function complement<A>(f: Fn<A, boolean>): Fn<A, boolean>;

@@ -1,3 +0,3 @@

import { FnAny } from "@thi.ng/api";
import type { FnAny } from "@thi.ng/api";
export declare const constantly: <T>(x: T) => FnAny<T>;
//# sourceMappingURL=constantly.d.ts.map

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

import { Fn0, IDeref } from "@thi.ng/api";
import type { Fn0, IDeref } from "@thi.ng/api";
export declare const delay: <T>(body: Fn0<T>) => Delay<T>;

@@ -3,0 +3,0 @@ export declare class Delay<T> implements IDeref<T> {

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

import { Fn } from "@thi.ng/api";
import type { Fn } from "@thi.ng/api";
/**

@@ -3,0 +3,0 @@ * Returns f(x) iff `x` is not null or undefined.

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

import { Fn } from "@thi.ng/api";
import type { Fn } from "@thi.ng/api";
export declare function juxt<T, A>(a: Fn<T, A>): Fn<T, [A]>;

@@ -3,0 +3,0 @@ export declare function juxt<T, A, B>(a: Fn<T, A>, b: Fn<T, B>): Fn<T, [A, B]>;

@@ -124,3 +124,2 @@ 'use strict';

}
const foo = partial((a, b) => a + b, "a");

@@ -150,3 +149,2 @@ const threadFirst = (init, ...fns) => fns.reduce((acc, expr) => typeof expr === "function"

exports.delayed = delayed;
exports.foo = foo;
exports.identity = identity;

@@ -153,0 +151,0 @@ exports.ifDef = ifDef;

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/errors")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/errors"],t):t(((e=e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.compose={}),e.thi.ng.errors)}(this,(function(e,t){"use strict";function r(...e){let[n,s,c,u,i,a,o,l,f,d]=e;switch(e.length){case 0:t.illegalArity(0);case 1:return n;case 2:return(...e)=>n(s(...e));case 3:return(...e)=>n(s(c(...e)));case 4:return(...e)=>n(s(c(u(...e))));case 5:return(...e)=>n(s(c(u(i(...e)))));case 6:return(...e)=>n(s(c(u(i(a(...e))))));case 7:return(...e)=>n(s(c(u(i(a(o(...e)))))));case 8:return(...e)=>n(s(c(u(i(a(o(l(...e))))))));case 9:return(...e)=>n(s(c(u(i(a(o(l(f(...e)))))))));case 10:default:const h=(...e)=>n(s(c(u(i(a(o(l(f(d(...e))))))))));return 10===e.length?h:r(h,...e.slice(10))}}function n(...e){return r.apply(null,e.reverse())}const s=n;class c{constructor(e){this.body=e,this.realized=!1}deref(){return this.realized||(this.value=this.body(),this.realized=!0),this.value}isRealized(){return this.realized}}function u(e,...r){let[n,s,c,u,i,a,o,l]=r;switch(r.length){case 1:return(...t)=>e(n,...t);case 2:return(...t)=>e(n,s,...t);case 3:return(...t)=>e(n,s,c,...t);case 4:return(...t)=>e(n,s,c,u,...t);case 5:return(...t)=>e(n,s,c,u,i,...t);case 6:return(...t)=>e(n,s,c,u,i,a,...t);case 7:return(...t)=>e(n,s,c,u,i,a,o,...t);case 8:return(...t)=>e(n,s,c,u,i,a,o,l,...t);default:t.illegalArgs()}}const i=u((e,t)=>e+t,"a");e.Delay=c,e.comp=r,e.compI=s,e.compL=n,e.complement=function(e){return(...t)=>!e(...t)},e.constantly=e=>()=>e,e.delay=e=>new c(e),e.delayed=(e,t)=>new Promise(r=>setTimeout(()=>r(e),t)),e.foo=i,e.identity=e=>e,e.ifDef=(e,t)=>null!=t?e(t):void 0,e.juxt=function(...e){const[t,r,n,s,c,u,i,a]=e;switch(e.length){case 1:return e=>[t(e)];case 2:return e=>[t(e),r(e)];case 3:return e=>[t(e),r(e),n(e)];case 4:return e=>[t(e),r(e),n(e),s(e)];case 5:return e=>[t(e),r(e),n(e),s(e),c(e)];case 6:return e=>[t(e),r(e),n(e),s(e),c(e),u(e)];case 7:return e=>[t(e),r(e),n(e),s(e),c(e),u(e),i(e)];case 8:return e=>[t(e),r(e),n(e),s(e),c(e),u(e),i(e),a(e)];default:return t=>{let r=new Array(e.length);for(let n=e.length;--n>=0;)r[n]=e[n](t);return r}}},e.partial=u,e.threadFirst=(e,...t)=>t.reduce((e,t)=>"function"==typeof t?t(e):t[0](e,...t.slice(1)),e),e.threadLast=(e,...t)=>t.reduce((e,t)=>"function"==typeof t?t(e):t[0](...t.slice(1),e),e),e.trampoline=e=>{for(;"function"==typeof e;)e=e();return e},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/errors")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/errors"],t):t(((e=e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.compose={}),e.thi.ng.errors)}(this,(function(e,t){"use strict";function r(...e){let[n,s,u,c,i,a,o,l,f,d]=e;switch(e.length){case 0:t.illegalArity(0);case 1:return n;case 2:return(...e)=>n(s(...e));case 3:return(...e)=>n(s(u(...e)));case 4:return(...e)=>n(s(u(c(...e))));case 5:return(...e)=>n(s(u(c(i(...e)))));case 6:return(...e)=>n(s(u(c(i(a(...e))))));case 7:return(...e)=>n(s(u(c(i(a(o(...e)))))));case 8:return(...e)=>n(s(u(c(i(a(o(l(...e))))))));case 9:return(...e)=>n(s(u(c(i(a(o(l(f(...e)))))))));case 10:default:const h=(...e)=>n(s(u(c(i(a(o(l(f(d(...e))))))))));return 10===e.length?h:r(h,...e.slice(10))}}function n(...e){return r.apply(null,e.reverse())}const s=n;class u{constructor(e){this.body=e,this.realized=!1}deref(){return this.realized||(this.value=this.body(),this.realized=!0),this.value}isRealized(){return this.realized}}e.Delay=u,e.comp=r,e.compI=s,e.compL=n,e.complement=function(e){return(...t)=>!e(...t)},e.constantly=e=>()=>e,e.delay=e=>new u(e),e.delayed=(e,t)=>new Promise(r=>setTimeout(()=>r(e),t)),e.identity=e=>e,e.ifDef=(e,t)=>null!=t?e(t):void 0,e.juxt=function(...e){const[t,r,n,s,u,c,i,a]=e;switch(e.length){case 1:return e=>[t(e)];case 2:return e=>[t(e),r(e)];case 3:return e=>[t(e),r(e),n(e)];case 4:return e=>[t(e),r(e),n(e),s(e)];case 5:return e=>[t(e),r(e),n(e),s(e),u(e)];case 6:return e=>[t(e),r(e),n(e),s(e),u(e),c(e)];case 7:return e=>[t(e),r(e),n(e),s(e),u(e),c(e),i(e)];case 8:return e=>[t(e),r(e),n(e),s(e),u(e),c(e),i(e),a(e)];default:return t=>{let r=new Array(e.length);for(let n=e.length;--n>=0;)r[n]=e[n](t);return r}}},e.partial=function(e,...r){let[n,s,u,c,i,a,o,l]=r;switch(r.length){case 1:return(...t)=>e(n,...t);case 2:return(...t)=>e(n,s,...t);case 3:return(...t)=>e(n,s,u,...t);case 4:return(...t)=>e(n,s,u,c,...t);case 5:return(...t)=>e(n,s,u,c,i,...t);case 6:return(...t)=>e(n,s,u,c,i,a,...t);case 7:return(...t)=>e(n,s,u,c,i,a,o,...t);case 8:return(...t)=>e(n,s,u,c,i,a,o,l,...t);default:t.illegalArgs()}},e.threadFirst=(e,...t)=>t.reduce((e,t)=>"function"==typeof t?t(e):t[0](e,...t.slice(1)),e),e.threadLast=(e,...t)=>t.reduce((e,t)=>"function"==typeof t?t(e):t[0](...t.slice(1),e),e),e.trampoline=e=>{for(;"function"==typeof e;)e=e();return e},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "@thi.ng/compose",
"version": "1.3.8",
"version": "1.3.9",
"description": "Optimized functional composition helpers",

@@ -31,14 +31,14 @@ "module": "./index.js",

"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@microsoft/api-extractor": "^7.7.7",
"@types/mocha": "^5.2.7",
"@types/node": "^13.5.0",
"mocha": "^7.0.0",
"@microsoft/api-extractor": "^7.7.8",
"@types/mocha": "^7.0.1",
"@types/node": "^13.7.4",
"mocha": "^7.0.1",
"nyc": "^15.0.0",
"ts-node": "^8.6.2",
"typedoc": "^0.16.8",
"typescript": "^3.7.5"
"typedoc": "^0.16.10",
"typescript": "^3.8.2"
},
"dependencies": {
"@thi.ng/api": "^6.7.1",
"@thi.ng/errors": "^1.2.3"
"@thi.ng/api": "^6.8.0",
"@thi.ng/errors": "^1.2.4"
},

@@ -55,3 +55,3 @@ "keywords": [

"sideEffects": false,
"gitHead": "38d193103121815a5794ae242817f8f306b6ddd4"
"gitHead": "b75ac2e62a828cc6ebf7b2aec4332bdf6f933a59"
}

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

import { FnAny, FnO, FnO2, FnO3, FnO4, FnO5, FnO6, FnO7, FnO8 } from "@thi.ng/api";
import type { FnAny, FnO, FnO2, FnO3, FnO4, FnO5, FnO6, FnO7, FnO8 } from "@thi.ng/api";
export declare function partial<A, T>(fn: FnO<A, T>, a: A): FnAny<T>;

@@ -10,3 +10,2 @@ export declare function partial<A, B, T>(fn: FnO2<A, B, T>, a: A, b: B): FnAny<T>;

export declare function partial<A, B, C, D, E, F, G, H, T>(fn: FnO8<A, B, C, D, E, F, G, H, T>, a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): FnAny<T>;
export declare const foo: FnAny<string>;
//# sourceMappingURL=partial.d.ts.map

@@ -25,2 +25,1 @@ import { illegalArgs } from "@thi.ng/errors";

}
export const foo = partial((a, b) => a + b, "a");
<!-- This file is generated - DO NOT EDIT! -->
# @thi.ng/compose
# ![@thi.ng/compose](https://media.thi.ng/umbrella/banners/thing-compose.svg?1581297778)

@@ -5,0 +5,0 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/compose.svg)](https://www.npmjs.com/package/@thi.ng/compose)

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

# ${pkg.name}
# ${pkg.banner}

@@ -3,0 +3,0 @@ [![npm version](https://img.shields.io/npm/v/${pkg.name}.svg)](https://www.npmjs.com/package/${pkg.name})

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

import { FnAny } from "@thi.ng/api";
import type { FnAny } from "@thi.ng/api";
/**

@@ -3,0 +3,0 @@ * Takes an `init` value and a number of functions and/or function

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

import { FnAny } from "@thi.ng/api";
import type { FnAny } from "@thi.ng/api";
/**

@@ -3,0 +3,0 @@ * Takes an `init` value and a number of functions and/or function

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

import { Fn0 } from "@thi.ng/api";
import type { Fn0 } from "@thi.ng/api";
/**

@@ -3,0 +3,0 @@ * Takes a function returning either a no-arg function (thunk) or its

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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