@most/disposable
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -51,78 +51,16 @@ /** @license MIT License (c) copyright 2010-2017 original author or authors */ | ||
// Non-mutating array operations | ||
// Non-mutating array operations | ||
// cons :: a -> [a] -> [a] | ||
// a with x prepended | ||
// append :: a -> [a] -> [a] | ||
// a with x appended | ||
// drop :: Int -> [a] -> [a] | ||
// drop first n elements | ||
// tail :: [a] -> [a] | ||
// drop head element | ||
// copy :: [a] -> [a] | ||
// duplicate a (shallow duplication) | ||
// map :: (a -> b) -> [a] -> [b] | ||
// transform each element with f | ||
// reduce :: (a -> b -> a) -> a -> [b] -> a | ||
// accumulate via left-fold | ||
function reduce (f, z, a) { | ||
var r = z; | ||
for (var i = 0, l = a.length; i < l; ++i) { | ||
r = f(r, a[i], i); | ||
// cons :: a -> [a] -> [a] | ||
// a with x prepended | ||
// reduce :: (a -> b -> a) -> a -> [b] -> a | ||
// accumulate via left-fold | ||
function reduce (f, z, a) { | ||
var r = z; | ||
for (var i = 0, l = a.length; i < l; ++i) { | ||
r = f(r, a[i], i); | ||
} | ||
return r | ||
} | ||
return r | ||
} | ||
// replace :: a -> Int -> [a] | ||
// replace element at index | ||
// remove :: Int -> [a] -> [a] | ||
// remove element at index | ||
// removeAll :: (a -> boolean) -> [a] -> [a] | ||
// remove all elements matching a predicate | ||
// findIndex :: a -> [a] -> Int | ||
// find index of x in a, from the left | ||
// isArrayLike :: * -> boolean | ||
// Return true iff x is array-like | ||
/** @license MIT License (c) copyright 2010-2016 original author or authors */ | ||
// id :: a -> a | ||
// compose :: (b -> c) -> (a -> b) -> (a -> c) | ||
// apply :: (a -> b) -> a -> b | ||
// curry2 :: ((a, b) -> c) -> (a -> b -> c) | ||
// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d) | ||
// curry4 :: ((a, b, c, d) -> e) -> (a -> b -> c -> d -> e) | ||
/** @license MIT License (c) copyright 2016 original author or authors */ | ||
/** @license MIT License (c) copyright 2010-2017 original author or authors */ | ||
@@ -129,0 +67,0 @@ // Aggregate a list of disposables into a DisposeAll |
@@ -57,78 +57,16 @@ (function (global, factory) { | ||
// Non-mutating array operations | ||
// Non-mutating array operations | ||
// cons :: a -> [a] -> [a] | ||
// a with x prepended | ||
// append :: a -> [a] -> [a] | ||
// a with x appended | ||
// drop :: Int -> [a] -> [a] | ||
// drop first n elements | ||
// tail :: [a] -> [a] | ||
// drop head element | ||
// copy :: [a] -> [a] | ||
// duplicate a (shallow duplication) | ||
// map :: (a -> b) -> [a] -> [b] | ||
// transform each element with f | ||
// reduce :: (a -> b -> a) -> a -> [b] -> a | ||
// accumulate via left-fold | ||
function reduce (f, z, a) { | ||
var r = z; | ||
for (var i = 0, l = a.length; i < l; ++i) { | ||
r = f(r, a[i], i); | ||
// cons :: a -> [a] -> [a] | ||
// a with x prepended | ||
// reduce :: (a -> b -> a) -> a -> [b] -> a | ||
// accumulate via left-fold | ||
function reduce (f, z, a) { | ||
var r = z; | ||
for (var i = 0, l = a.length; i < l; ++i) { | ||
r = f(r, a[i], i); | ||
} | ||
return r | ||
} | ||
return r | ||
} | ||
// replace :: a -> Int -> [a] | ||
// replace element at index | ||
// remove :: Int -> [a] -> [a] | ||
// remove element at index | ||
// removeAll :: (a -> boolean) -> [a] -> [a] | ||
// remove all elements matching a predicate | ||
// findIndex :: a -> [a] -> Int | ||
// find index of x in a, from the left | ||
// isArrayLike :: * -> boolean | ||
// Return true iff x is array-like | ||
/** @license MIT License (c) copyright 2010-2016 original author or authors */ | ||
// id :: a -> a | ||
// compose :: (b -> c) -> (a -> b) -> (a -> c) | ||
// apply :: (a -> b) -> a -> b | ||
// curry2 :: ((a, b) -> c) -> (a -> b -> c) | ||
// curry3 :: ((a, b, c) -> d) -> (a -> b -> c -> d) | ||
// curry4 :: ((a, b, c, d) -> e) -> (a -> b -> c -> d -> e) | ||
/** @license MIT License (c) copyright 2016 original author or authors */ | ||
/** @license MIT License (c) copyright 2010-2017 original author or authors */ | ||
@@ -135,0 +73,0 @@ // Aggregate a list of disposables into a DisposeAll |
{ | ||
"name": "@most/disposable", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Reactive programming with lean, functions-only, curried, tree-shakeable API", | ||
@@ -48,3 +48,3 @@ "typings": "type-definitions/index.d.ts", | ||
"eslint": "^3.15.0", | ||
"flow-bin": "^0.37.4", | ||
"flow-bin": "^0.43.1", | ||
"mocha": "^3.2.0", | ||
@@ -58,5 +58,5 @@ "rollup": "^0.41.4", | ||
"dependencies": { | ||
"@most/prelude": "^1.4.0", | ||
"@most/types": "^0.4.0" | ||
"@most/prelude": "^1.5.2", | ||
"@most/types": "^0.4.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
38210
245
1
Updated@most/prelude@^1.5.2
Updated@most/types@^0.4.1