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

@appliedblockchain/assert-combinators

Package Overview
Dependencies
Maintainers
15
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appliedblockchain/assert-combinators - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

types/a.js

10

Changelog.md
# Changelog
## [v1.3.0](../../compare/v1.2.1...v1.3.0) (2020-04-14)
* Exporting sequence and map, fixing one-of.
* Updating changelog.
## [v1.2.1](../../compare/v1.2.0...v1.2.1) (2020-04-14)
* Updating type on one-of.
* Updating changelog.
## [v1.2.0](../../compare/v1.1.1...v1.2.0) (2020-04-13)

@@ -4,0 +14,0 @@

4

index.js

@@ -10,2 +10,3 @@ // @flow strict

const finite = require('./finite')
const map = require('./map')
const mixed = require('./mixed')

@@ -21,2 +22,3 @@ const nil = require('./nil')

const predicate = require('./predicate')
const sequence = require('./sequence')
const shape = require('./shape')

@@ -37,2 +39,3 @@ const string = require('./string')

finite,
map,
mixed,

@@ -48,2 +51,3 @@ nil,

predicate,
sequence,
shape,

@@ -50,0 +54,0 @@ string,

8

map.js

@@ -1,6 +0,8 @@

// @flow
// @flow strict
const { inspect } = require('util')
const map /*: <T>(mixed => T) => (mixed => T[]) */ = /*:: <T> */
/*:: import type { $A } from './types/a' */
const map /*: <T>($A<T>) => $A<T[]> */ = /*:: <T> */
(a) =>

@@ -11,5 +13,5 @@ values => {

}
return values.map(a)
return values.map(_ => a(_))
}
module.exports = map

@@ -7,43 +7,46 @@ // @flow strict

type OneOf =
& (() => (mixed => mixed))
& (<A>(A) => (mixed => A))
& (<A, B>(A, B) => (mixed => (A | B)))
& (<A, B, C>(A, B, C) => (mixed => (A | B | C)))
& (<A, B, C, D>(A, B, C, D) => (mixed => (A | B | C | D)))
& (<A, B, C, D, E>(A, B, C, D, E) => (mixed => (A | B | C | D | E)))
& (<A, B, C, D, E, F>(A, B, C, D, E, F) => (mixed => (A | B | C | D | E | F)))
& (<A, B, C, D, E, F, G>(A, B, C, D, E, F, G) => (mixed => (A | B | C | D | E | F | G)))
& (<A, B, C, D, E, F, G, H>(A, B, C, D, E, F, G, H) => (mixed => (A | B | C | D | E | F | G | H)))
& (<A, B, C, D, E, F, G, H, I>(A, B, C, D, E, F, G, H, I) => (mixed => (A | B | C | D | E | F | G | H | I)))
& (<A, B, C, D, E, F, G, H, I, J>(A, B, C, D, E, F, G, H, I, J) => (mixed => (A | B | C | D | E | F | G | H | I | J)))
& (<A, B, C, D, E, F, G, H, I, J, K>(A, B, C, D, E, F, G, H, I, J, K) => (mixed => (A | B | C | D | E | F | G | H | I | J | K)))
& (<A, B, C, D, E, F, G, H, I, J, K, L>(A, B, C, D, E, F, G, H, I, J, K, L) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M>(A, B, C, D, E, F, G, H, I, J, K, L, M) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(A, B, C, D, E, F, G, H, I, J, K, L, M, N) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X)))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y) => (mixed => (A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y)))
import type { $A } from './types/a'
declare function oneOf<A>(A): $A<A>;
declare function oneOf<A, B>(A, B): $A<A | B>;
declare function oneOf<A, B, C>(A, B, C): $A<A | B | C>;
declare function oneOf<A, B, C, D>(A, B, C, D): $A<A | B | C | D>;
declare function oneOf<A, B, C, D, E>(A, B, C, D, E): $A<A | B | C | D | E>;
declare function oneOf<A, B, C, D, E, F>(A, B, C, D, E, F): $A<A | B | C | D | E | F>;
declare function oneOf<A, B, C, D, E, F, G>(A, B, C, D, E, F, G): $A<A | B | C | D | E | F | G>;
declare function oneOf<A, B, C, D, E, F, G, H>(A, B, C, D, E, F, G, H): $A<A | B | C | D | E | F | G | H>;
declare function oneOf<A, B, C, D, E, F, G, H, I>(A, B, C, D, E, F, G, H, I): $A<A | B | C | D | E | F | G | H | I>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J>(A, B, C, D, E, F, G, H, I, J): $A<A | B | C | D | E | F | G | H | I | J>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K>(A, B, C, D, E, F, G, H, I, J, K): $A<A | B | C | D | E | F | G | H | I | J | K>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L>(A, B, C, D, E, F, G, H, I, J, K, L): $A<A | B | C | D | E | F | G | H | I | J | K | L>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M>(A, B, C, D, E, F, G, H, I, J, K, L, M): $A<A | B | C | D | E | F | G | H | I | J | K | L | M>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(A, B, C, D, E, F, G, H, I, J, K, L, M, N): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X>;
declare function oneOf<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y>(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y): $A<A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y>;
*/
const oneOf /*: OneOf */ =
(...values) =>
value => {
// $FlowFixMe
const oneOf =
(...values) => {
if (!values.length) {
throw new TypeError('Expected non-zero arity.')
}
return value => {
if (!values.includes(value)) {
throw new TypeError(`Expected ${inspect(value)} to be one of ${inspect(values)}.`)
}
// $FlowFixMe
return value
}
}
module.exports = oneOf

@@ -7,3 +7,3 @@ // @flow strict

type $A<R> = mixed => R
import type { $A } from './types/a'

@@ -10,0 +10,0 @@ declare function or<A>($A<A>): $A<A>;

{
"name": "@appliedblockchain/assert-combinators",
"version": "1.2.0",
"version": "1.3.0",
"description": "Assertion combinators.",

@@ -19,3 +19,3 @@ "main": "index.js",

"flow-bin": "0.122.0",
"jest": "25.2.4"
"jest": "25.3.0"
},

@@ -22,0 +22,0 @@ "jest": {

@@ -1,38 +0,42 @@

// @flow
// @flow strict
/*::
type Sequence =
& (() => (mixed => mixed))
& (<A>(mixed => A) => (mixed => A))
& (<A,B>(mixed => A, A => B) => (mixed => B))
& (<A, B, C>(mixed => A, A => B, B => C) => (mixed => C))
& (<A, B, C, D>(mixed => A, A => B, B => C, C => D) => (mixed => D))
& (<A, B, C, D, E>(mixed => A, A => B, B => C, C => D, D => E) => (mixed => E))
& (<A, B, C, D, E, F>(mixed => A, A => B, B => C, C => D, D => E, E => F) => (mixed => F))
& (<A, B, C, D, E, F, G>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G) => (mixed => G))
& (<A, B, C, D, E, F, G, H>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H) => (mixed => H))
& (<A, B, C, D, E, F, G, H, I>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I) => (mixed => I))
& (<A, B, C, D, E, F, G, H, I, J>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J) => (mixed => J))
& (<A, B, C, D, E, F, G, H, I, J, K>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K) => (mixed => K))
& (<A, B, C, D, E, F, G, H, I, J, K, L>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L) => (mixed => L))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M) => (mixed => M))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N) => (mixed => N))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O) => (mixed => O))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P) => (mixed => P))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q) => (mixed => Q))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R) => (mixed => R))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S) => (mixed => S))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T) => (mixed => T))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T, T => U) => (mixed => U))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T, T => U, U => V) => (mixed => V))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T, T => U, U => V, V => W) => (mixed => W))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T, T => U, U => V, V => W, W => X) => (mixed => X))
& (<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y>(mixed => A, A => B, B => C, C => D, D => E, E => F, F => G, G => H, H => I, I => J, J => K, K => L, L => M, M => N, N => O, O => P, P => Q, Q => R, R => S, S => T, T => U, U => V, V => W, W => X, X => Y) => (mixed => Y))
import type { $A } from './types/a'
declare function sequence<A>($A<A>): $A<A>;
declare function sequence<A,B>($A<A>,A=>B): $A<B>;
declare function sequence<A,B,C>($A<A>,A=>B,B=>C): $A<C>;
declare function sequence<A,B,C,D>($A<A>,A=>B,B=>C,C=>D): $A<D>;
declare function sequence<A,B,C,D,E>($A<A>,A=>B,B=>C,C=>D,D=>E): $A<E>;
declare function sequence<A,B,C,D,E,F>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F): $A<F>;
declare function sequence<A,B,C,D,E,F,G>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G): $A<G>;
declare function sequence<A,B,C,D,E,F,G,H>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H): $A<H>;
declare function sequence<A,B,C,D,E,F,G,H,I>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I): $A<I>;
declare function sequence<A,B,C,D,E,F,G,H,I,J>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J): $A<J>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K): $A<K>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L): $A<L>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M): $A<M>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N): $A<N>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O): $A<O>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P): $A<P>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q): $A<Q>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R): $A<R>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S): $A<S>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T): $A<T>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T,T=>U): $A<U>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T,T=>U,U=>V): $A<V>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T,T=>U,U=>V,V=>W): $A<W>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T,T=>U,U=>V,V=>W,W=>X): $A<X>;
declare function sequence<A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y>($A<A>,A=>B,B=>C,C=>D,D=>E,E=>F,F=>G,G=>H,H=>I,I=>J,J=>K,K=>L,L=>M,M=>N,N=>O,O=>P,P=>Q,Q=>R,R=>S,S=>T,T=>U,U=>V,V=>W,W=>X,X=>Y): $A<Y>;
*/
const sequence /*: Sequence */ =
(...as /*: any[] */) =>
value => {
// $FlowFixMe
const sequence =
(...as) => {
if (!as.length) {
throw new TypeError('Expected non-zero arity.')
}
return value => {
let r = value

@@ -42,5 +46,6 @@ for (const a of as) {

}
return (r /*: any */)
return r
}
}
module.exports = sequence
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