@briancavalier/most-behavior
Advanced tools
Comparing version 3.0.1 to 4.0.0
@@ -1,66 +0,2 @@ | ||
import { snapshot, map, startWith } from '@most/core'; | ||
// | ||
var snapshotTime = function (stream ) { return new SnapshotTime(stream); }; | ||
var SnapshotTime = function SnapshotTime (source ) { | ||
this.source = source; | ||
}; | ||
SnapshotTime.prototype.run = function run (sink , scheduler ) { | ||
return this.source.run(new SnapshotTimeSink(sink), scheduler) | ||
}; | ||
var SnapshotTimeSink = function SnapshotTimeSink (sink ) { | ||
this.sink = sink; | ||
}; | ||
SnapshotTimeSink.prototype.event = function event (t , a ) { | ||
this.sink.event(t, [t, a]); | ||
}; | ||
SnapshotTimeSink.prototype.error = function error (t , e ) { | ||
this.sink.error(t, e); | ||
}; | ||
SnapshotTimeSink.prototype.end = function end (t ) { | ||
this.sink.end(t); | ||
}; | ||
// | ||
var snapshot$1 = function (b , s ) { return b(s); }; | ||
var sample = function (b , s ) { return map(function (ab) { return ab[0]; }, snapshot$1(b, s)); }; | ||
var always = function (a ) { return function (sb ) { return map(function (b) { return [a, b]; }, sb); }; }; | ||
var fromTime = function (f ) { return map$1(f, snapshotTime); }; | ||
var step = function (a , sa ) { return function (sb ) { return snapshot(function (a, b) { return [a, b]; }, startWith(a, sa), sb); }; }; | ||
var map$1 = function (f , ba ) { return function (sc ) { return map(function (ref) { | ||
var a = ref[0]; | ||
var c = ref[1]; | ||
return [f(a), c]; | ||
}, snapshot$1(ba, sc)); }; }; | ||
var apply = function (bf , ba ) { return liftA2(function (f, a) { return f(a); }, bf, ba); }; | ||
var liftA2 = function (f , ba , bb ) { return function (sd ) { return map(function (ref) { | ||
var a = ref[0]; | ||
var ref_1 = ref[1]; | ||
var b = ref_1[0]; | ||
var d = ref_1[1]; | ||
return [f(a, b), d]; | ||
}, snapshot$1(ba, snapshot$1(bb, sd))); }; }; | ||
export { snapshot$1 as snapshot, sample, snapshotTime as time, always, fromTime, step, map$1 as map, apply, liftA2 }; | ||
import{snapshot as n,map as t,startWith as r}from"@most/core";var u=function(n){return new o(n)},o=function(n){this.source=n};o.prototype.run=function(n,t){return this.source.run(new e(n),t)};var e=function(n){this.sink=n};e.prototype.event=function(n,t){this.sink.event(n,[n,t])},e.prototype.error=function(n,t){this.sink.error(n,t)},e.prototype.end=function(n){this.sink.end(n)};var i=function(n,t){return n(t)},c=function(n,r){return t(function(n){return n[0]},i(n,r))},f=function(n){return function(r){return t(function(t){return[n,t]},r)}},s=function(n){return a(n,u)},p=function(t,u){return function(o){return n(function(n,t){return[n,t]},r(t,u),o)}},a=function(n,r){return function(u){return t(function(t){var r=t[1];return[n(t[0]),r]},i(r,u))}},h=function(n,t){return v(function(n,t){return n(t)},n,t)},v=function(n,r,u){return function(o){return t(function(t){var r=t[1],u=r[1];return[n(t[0],r[0]),u]},i(r,i(u,o)))}};export{i as snapshot,c as sample,u as time,f as always,s as fromTime,p as step,a as map,h as apply,v as liftA2}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,82 +0,2 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@most/core')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@most/core'], factory) : | ||
(factory((global.mostBehave = {}),global.mostCore)); | ||
}(this, (function (exports,core) { 'use strict'; | ||
// | ||
var snapshotTime = function (stream ) { return new SnapshotTime(stream); }; | ||
var SnapshotTime = function SnapshotTime (source ) { | ||
this.source = source; | ||
}; | ||
SnapshotTime.prototype.run = function run (sink , scheduler ) { | ||
return this.source.run(new SnapshotTimeSink(sink), scheduler) | ||
}; | ||
var SnapshotTimeSink = function SnapshotTimeSink (sink ) { | ||
this.sink = sink; | ||
}; | ||
SnapshotTimeSink.prototype.event = function event (t , a ) { | ||
this.sink.event(t, [t, a]); | ||
}; | ||
SnapshotTimeSink.prototype.error = function error (t , e ) { | ||
this.sink.error(t, e); | ||
}; | ||
SnapshotTimeSink.prototype.end = function end (t ) { | ||
this.sink.end(t); | ||
}; | ||
// | ||
var snapshot = function (b , s ) { return b(s); }; | ||
var sample = function (b , s ) { return core.map(function (ab) { return ab[0]; }, snapshot(b, s)); }; | ||
var always = function (a ) { return function (sb ) { return core.map(function (b) { return [a, b]; }, sb); }; }; | ||
var fromTime = function (f ) { return map(f, snapshotTime); }; | ||
var step = function (a , sa ) { return function (sb ) { return core.snapshot(function (a, b) { return [a, b]; }, core.startWith(a, sa), sb); }; }; | ||
var map = function (f , ba ) { return function (sc ) { return core.map(function (ref) { | ||
var a = ref[0]; | ||
var c = ref[1]; | ||
return [f(a), c]; | ||
}, snapshot(ba, sc)); }; }; | ||
var apply = function (bf , ba ) { return liftA2(function (f, a) { return f(a); }, bf, ba); }; | ||
var liftA2 = function (f , ba , bb ) { return function (sd ) { return core.map(function (ref) { | ||
var a = ref[0]; | ||
var ref_1 = ref[1]; | ||
var b = ref_1[0]; | ||
var d = ref_1[1]; | ||
return [f(a, b), d]; | ||
}, snapshot(ba, snapshot(bb, sd))); }; }; | ||
exports.snapshot = snapshot; | ||
exports.sample = sample; | ||
exports.time = snapshotTime; | ||
exports.always = always; | ||
exports.fromTime = fromTime; | ||
exports.step = step; | ||
exports.map = map; | ||
exports.apply = apply; | ||
exports.liftA2 = liftA2; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
var n=require("@most/core"),t=function(n){return new r(n)},r=function(n){this.source=n};r.prototype.run=function(n,t){return this.source.run(new e(n),t)};var e=function(n){this.sink=n};e.prototype.event=function(n,t){this.sink.event(n,[n,t])},e.prototype.error=function(n,t){this.sink.error(n,t)},e.prototype.end=function(n){this.sink.end(n)};var o=function(n,t){return n(t)},u=function(t,r){return function(e){return n.map(function(n){var r=n[1];return[t(n[0]),r]},o(r,e))}},i=function(t,r,e){return function(u){return n.map(function(n){var r=n[1],e=r[1];return[t(n[0],r[0]),e]},o(r,o(e,u)))}};exports.snapshot=o,exports.sample=function(t,r){return n.map(function(n){return n[0]},o(t,r))},exports.time=t,exports.always=function(t){return function(r){return n.map(function(n){return[t,n]},r)}},exports.fromTime=function(n){return u(n,t)},exports.step=function(t,r){return function(e){return n.snapshot(function(n,t){return[n,t]},n.startWith(t,r),e)}},exports.map=u,exports.apply=function(n,t){return i(function(n,t){return n(t)},n,t)},exports.liftA2=i; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@briancavalier/most-behavior", | ||
"description": "behave", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"author": "Brian Cavalier <brian@briancavalier.com> (github.com/briancavalier)", | ||
@@ -12,15 +12,11 @@ "bugs": { | ||
"@most/dom-event": "^2.0.0", | ||
"babel-eslint": "^10.0.1", | ||
"buba": "^4.0.2", | ||
"eslint-plugin-flowtype": "^3.2.0", | ||
"flow-bin": "^0.87.0", | ||
"flow-copy-source": "^2.0.2", | ||
"mocha": "^5.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^13.1.0", | ||
"rollup": "^0.67.3", | ||
"rollup-plugin-buble": "^0.19.4", | ||
"rollup-plugin-flow": "^1.1.1", | ||
"rollup-plugin-node-resolve": "^3.4.0", | ||
"standard": "^12.0.1" | ||
"@typescript-eslint/eslint-plugin": "^2.13.0", | ||
"@typescript-eslint/parser": "^2.13.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.9.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"microbundle": "^0.11.0", | ||
"parcel": "^1.12.4", | ||
"prettier": "^1.19.1", | ||
"typescript": "^3.7.4" | ||
}, | ||
@@ -38,26 +34,16 @@ "files": [ | ||
}, | ||
"typings": "type-definitions/index.d.ts", | ||
"scripts": { | ||
"build": "npm run build:dist", | ||
"build:dist": "mkdir -p dist && rollup -c && flow-copy-source src dist", | ||
"build:add-inputs": "rollup -c examples/rollup.config.js -o examples/add-inputs/app.js examples/add-inputs/index.js", | ||
"build:simple-clock": "rollup -c examples/rollup.config.js -o examples/simple-clock/app.js examples/simple-clock/index.js", | ||
"build:secret-combination": "rollup -c examples/rollup.config.js -o examples/secret-combination/app.js examples/secret-combination/index.js", | ||
"test": "run-p test:typecheck test:lint", | ||
"test:lint": "standard --fix --verbose 'src/*.js'", | ||
"test:typecheck": "flow check", | ||
"build": "microbundle build", | ||
"build:add-inputs": "parcel serve examples/add-inputs/index.html", | ||
"build:simple-clock": "parcel serve examples/simple-clock/index.html", | ||
"build:secret-combination": "parcel serve examples/secret-combination/index.html", | ||
"test": "tsc --noEmit && eslint 'src/**/*.ts' --fix", | ||
"prepublishOnly": "npm run build" | ||
}, | ||
"dependencies": { | ||
"@most/core": "^1.3.2", | ||
"@most/core": "^1.5.0", | ||
"@most/disposable": "^1.2.1", | ||
"@most/prelude": "^1.7.2", | ||
"@most/types": "^1.0.1" | ||
}, | ||
"standard": { | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"flowtype" | ||
] | ||
"@most/types": "^1.0.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
376439
11
20
3594
2
2
2
Updated@most/core@^1.5.0
Updated@most/types@^1.0.2