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

vega-dataflow

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-dataflow - npm Package Compare versions

Comparing version 5.6.0 to 5.7.0

2

build/vega-dataflow.min.js

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vega-util"),require("vega-loader"),require("vega-format")):"function"==typeof define&&define.amd?define(["exports","vega-util","vega-loader","vega-format"],n):n((t=t||self).vega={},t.vega,t.vega,t.vega)}(this,(function(t,n,e,r){"use strict";function i(t){var e=t||n.identity,r=[],i={};return r.add=function(t){var n=e(t);return i[n]||(i[n]=1,r.push(t)),r},r.remove=function(t){var n,s=e(t);return i[s]&&(i[s]=0,(n=r.indexOf(t))>=0&&r.splice(n,1)),r},r}async function s(t,n){try{await n(t)}catch(n){t.error(n)}}var u=Symbol("vega_id"),a=1;function o(t){return t[u]}function l(t,n){return t[u]=n,t}function h(t){var n=t===Object(t)?t:{data:t};return o(n)?n:l(n,a++)}function c(t,n){for(var e in t)n[e]=t[e];return n}function f(t){return t&&t.constructor===d}function d(){var t=[],e=[],r=[],i=[],s=[],u=!1;return{constructor:d,insert:function(e){for(var r=n.array(e),i=0,s=r.length;i<s;++i)t.push(r[i]);return this},remove:function(t){for(var r=n.isFunction(t)?i:e,s=n.array(t),u=0,a=s.length;u<a;++u)r.push(s[u]);return this},modify:function(t,e,i){var u={field:e,value:n.constant(i)};return n.isFunction(t)?(u.filter=t,s.push(u)):(u.tuple=t,r.push(u)),this},encode:function(t,e){return n.isFunction(t)?s.push({filter:t,field:e}):r.push({tuple:t,field:e}),this},reflow:function(){return u=!0,this},pulse:function(n,a){var l,c,f,d,p,v,g={},m={};for(l=0,c=a.length;l<c;++l)g[o(a[l])]=1;for(l=0,c=e.length;l<c;++l)g[o(p=e[l])]=-1;for(l=0,c=i.length;l<c;++l)d=i[l],a.forEach((function(t){d(t)&&(g[o(t)]=-1)}));for(l=0,c=t.length;l<c;++l)v=o(p=t[l]),g[v]?g[v]=1:n.add.push(h(t[l]));for(l=0,c=a.length;l<c;++l)p=a[l],g[o(p)]<0&&n.rem.push(p);function _(t,e,r){r?t[e]=r(t):n.encode=e,u||(m[o(t)]=t)}for(l=0,c=r.length;l<c;++l)p=(f=r[l]).tuple,d=f.field,(v=g[o(p)])>0&&(_(p,d,f.value),n.modifies(d));for(l=0,c=s.length;l<c;++l)f=s[l],d=f.filter,a.forEach((function(t){d(t)&&g[o(t)]>0&&_(t,f.field,f.value)})),n.modifies(f.field);if(u)n.mod=e.length||i.length?a.filter((function(t){return g[o(t)]>0})):a.slice();else for(v in m)n.mod.push(m[v]);return n}}}var p="_:mod:_";function v(){Object.defineProperty(this,p,{writable:!0,value:{}})}var g=v.prototype;g.set=function(t,e,r,i){var s=this,u=s[t],a=s[p];return null!=e&&e>=0?(u[e]!==r||i)&&(u[e]=r,a[e+":"+t]=-1,a[t]=-1):(u!==r||i)&&(s[t]=r,a[t]=n.isArray(r)?1+r.length:-1),s},g.modified=function(t,e){var r,i=this[p];if(!arguments.length){for(r in i)if(i[r])return!0;return!1}if(n.isArray(t)){for(r=0;r<t.length;++r)if(i[t[r]])return!0;return!1}return null!=e&&e>=0?e+1<i[t]||!!i[e+":"+t]:!!i[t]},g.clear=function(){return this[p]={},this};var m=0,_=new v;function y(t,n,e,r){this.id=++m,this.value=t,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,n&&(this._update=n),e&&this.parameters(e,r)}var w=y.prototype;function k(t){return function(n){var e=this.flags;return 0===arguments.length?!!(e&t):(this.flags=n?e|t:e&~t,this)}}w.targets=function(){return this._targets||(this._targets=i(n.id))},w.set=function(t){return this.value!==t?(this.value=t,1):0},w.skip=k(1),w.modified=k(2),w.parameters=function(t,e,r){e=!1!==e;var i,s,u,a,o=this,l=o._argval=o._argval||new v,h=o._argops=o._argops||[],c=[];function f(t,n,r){r instanceof y?(r!==o&&(e&&r.targets().add(o),c.push(r)),h.push({op:r,name:t,index:n})):l.set(t,n,r)}for(i in t)if(s=t[i],"pulse"===i)n.array(s).forEach((function(t){t instanceof y?t!==o&&(t.targets().add(o),c.push(t)):n.error("Pulse parameters must be operator instances.")})),o.source=s;else if(n.isArray(s))for(l.set(i,-1,Array(u=s.length)),a=0;a<u;++a)f(i,a,s[a]);else f(i,-1,s);return this.marshall().clear(),r&&(h.initonly=!0),c},w.marshall=function(t){var n,e,r,i,s,u=this._argval||_,a=this._argops;if(a){for(e=0,r=a.length;e<r;++e)s=(i=(n=a[e]).op).modified()&&i.stamp===t,u.set(n.name,n.index,i.value,s);if(a.initonly){for(e=0;e<r;++e)(n=a[e]).op.targets().remove(this);this._argops=null,this._update=null}}return u},w.evaluate=function(t){var n=this._update;if(n){var e=this.marshall(t.stamp),r=n.call(this,e,t);if(e.clear(),r!==this.value)this.value=r;else if(!this.modified())return t.StopPropagation}},w.run=function(t){return t.stamp<this.stamp?t.StopPropagation:(this.skip()?(this.skip(!1),n=0):n=this.evaluate(t),this.pulse=n||t);var n};var F=0;function A(t,n,e){this.id=++F,this.value=null,e&&(this.receive=e),t&&(this._filter=t),n&&(this._apply=n)}function D(t,n,e){return new A(t,n,e)}var P=A.prototype;P._filter=n.truthy,P._apply=n.identity,P.targets=function(){return this._targets||(this._targets=i(n.id))},P.consume=function(t){return arguments.length?(this._consume=!!t,this):!!this._consume},P.receive=function(t){if(this._filter(t)){for(var n=this.value=this._apply(t),e=this._targets,r=e?e.length:0,i=0;i<r;++i)e[i].receive(n);this._consume&&(t.preventDefault(),t.stopPropagation())}},P.filter=function(t){var n=D(t);return this.targets().add(n),n},P.apply=function(t){var n=D(null,t);return this.targets().add(n),n},P.merge=function(){var t=D();this.targets().add(t);for(var n=0,e=arguments.length;n<e;++n)arguments[n].targets().add(t);return t},P.throttle=function(t){var n=-1;return this.filter((function(){var e=Date.now();return e-n>t?(n=e,1):0}))},P.debounce=function(t){var e=D();return this.targets().add(D(null,null,n.debounce(t,(function(t){var n=t.dataflow;e.receive(t),n&&n.run&&n.run()})))),e},P.between=function(t,n){var e=!1;return t.targets().add(D(null,null,(function(){e=!0}))),n.targets().add(D(null,null,(function(){e=!1}))),this.filter((function(){return e}))};var O={skip:!0};function E(t,e,r,i,s,u){var a,o,l=n.extend({},u,O);n.isFunction(r)||(r=n.constant(r)),void 0===i?a=n=>t.touch(r(n)):n.isFunction(i)?(o=new y(null,i,s,!1),a=n=>{o.evaluate(n);const e=r(n),i=o.value;f(i)?t.pulse(e,i,u):t.update(e,i,l)}):a=n=>t.update(r(n),i,l),e.apply(a)}function b(t,e,r,i,s,u){if(void 0===i)e.targets().add(r);else{const a=u||{},o=new y(null,function(t,e){return e=n.isFunction(e)?e:n.constant(e),t?function(n,r){const i=e(n,r);return t.skip()||(t.skip(i!==this.value).value=i),i}:e}(r,i),s,!1);o.modified(a.force),o.rank=e.rank,e.targets().add(o),r&&(o.skip(!0),o.value=r.value,o.targets().add(r),t.connect(r,[o]))}}var q={};function M(t,n,e){this.dataflow=t,this.stamp=null==n?-1:n,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=e||null}var S=M.prototype;function L(t,n){return t?function(e,r){return t(e,r)&&n(e,r)}:n}function R(t,e){var r=[];return n.visitArray(t,e,(function(t){r.push(t)})),r}function x(t,n){var e={};return t.visit(n,(function(t){e[o(t)]=1})),function(t){return e[o(t)]?null:t}}function C(t,n,e,r){var i,s,u,a,o,l=this,h=0;for(this.dataflow=t,this.stamp=n,this.fields=null,this.encode=r||null,this.pulses=e,u=0,a=e.length;u<a;++u)if((i=e[u]).stamp===n){if(i.fields)for(o in s=l.fields||(l.fields={}),i.fields)s[o]=1;i.changed(l.ADD)&&(h|=l.ADD),i.changed(l.REM)&&(h|=l.REM),i.changed(l.MOD)&&(h|=l.MOD)}this.changes=h}S.StopPropagation=q,S.ADD=1,S.REM=2,S.MOD=4,S.ADD_REM=3,S.ADD_MOD=5,S.ALL=7,S.REFLOW=8,S.SOURCE=16,S.NO_SOURCE=32,S.NO_FIELDS=64,S.fork=function(t){return new M(this.dataflow).init(this,t)},S.clone=function(){var t=this.fork(7);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(23)},S.addAll=function(){var t=this;return this.source&&this.source.length!==this.add.length?((t=new M(this.dataflow).init(this)).add=t.source,t):t},S.init=function(t,n){var e=this;return e.stamp=t.stamp,e.encode=t.encode,!t.fields||64&n||(e.fields=t.fields),1&n?(e.addF=t.addF,e.add=t.add):(e.addF=null,e.add=[]),2&n?(e.remF=t.remF,e.rem=t.rem):(e.remF=null,e.rem=[]),4&n?(e.modF=t.modF,e.mod=t.mod):(e.modF=null,e.mod=[]),32&n?(e.srcF=null,e.source=null):(e.srcF=t.srcF,e.source=t.source),e},S.runAfter=function(t){this.dataflow.runAfter(t)},S.changed=function(t){var n=t||7;return 1&n&&this.add.length||2&n&&this.rem.length||4&n&&this.mod.length},S.reflow=function(t){if(t)return this.fork(7).reflow();var n=this.add.length,e=this.source&&this.source.length;return e&&e!==n&&(this.mod=this.source,n&&this.filter(4,x(this,1))),this},S.modifies=function(t){var e=this.fields||(this.fields={});return n.isArray(t)?t.forEach(t=>e[t]=!0):e[t]=!0,this},S.modified=function(t,e){var r=this.fields;return!(!e&&!this.mod.length||!r)&&(arguments.length?n.isArray(t)?t.some((function(t){return r[t]})):r[t]:!!r)},S.filter=function(t,n){var e=this;return 1&t&&(e.addF=L(e.addF,n)),2&t&&(e.remF=L(e.remF,n)),4&t&&(e.modF=L(e.modF,n)),16&t&&(e.srcF=L(e.srcF,n)),e},S.materialize=function(t){var n=this;return 1&(t=t||7)&&n.addF&&(n.add=R(n.add,n.addF),n.addF=null),2&t&&n.remF&&(n.rem=R(n.rem,n.remF),n.remF=null),4&t&&n.modF&&(n.mod=R(n.mod,n.modF),n.modF=null),16&t&&n.srcF&&(n.source=n.source.filter(n.srcF),n.srcF=null),n},S.visit=function(t,e){var r,i,s=this,u=e;return 16&t?(n.visitArray(s.source,s.srcF,u),s):(1&t&&n.visitArray(s.add,s.addF,u),2&t&&n.visitArray(s.rem,s.remF,u),4&t&&n.visitArray(s.mod,s.modF,u),8&t&&(r=s.source)&&((i=s.add.length+s.mod.length)===r.length||(i?n.visitArray(r,x(s,5),u):n.visitArray(r,s.srcF,u))),s)};var T=n.inherits(C,M);function z(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}T.fork=function(t){var n=new M(this.dataflow).init(this,t&this.NO_FIELDS);return void 0!==t&&(t&n.ADD&&this.visit(n.ADD,(function(t){return n.add.push(t)})),t&n.REM&&this.visit(n.REM,(function(t){return n.rem.push(t)})),t&n.MOD&&this.visit(n.MOD,(function(t){return n.mod.push(t)}))),n},T.changed=function(t){return this.changes&t},T.modified=function(t){var e=this,r=e.fields;return r&&e.changes&e.MOD?n.isArray(t)?t.some((function(t){return r[t]})):r[t]:0},T.filter=function(){n.error("MultiPulse does not support filtering.")},T.materialize=function(){n.error("MultiPulse does not support materialization.")},T.visit=function(t,n){var e=this,r=e.pulses,i=r.length,s=0;if(t&e.SOURCE)for(;s<i;++s)r[s].visit(t,n);else for(;s<i;++s)r[s].stamp===e.stamp&&r[s].visit(t,n);return e};var I={skip:!1,force:!1};function U(t){var n=[];return{clear:()=>n=[],size:()=>n.length,peek:()=>n[0],push:e=>(n.push(e),j(n,0,n.length-1,t)),pop:()=>{var e,r=n.pop();return n.length?(e=n[0],n[0]=r,function(t,n,e){var r,i=n,s=t.length,u=t[n],a=1+(n<<1);for(;a<s;)(r=a+1)<s&&e(t[a],t[r])>=0&&(a=r),t[n]=t[a],a=1+((n=a)<<1);t[n]=u,j(t,i,n,e)}(n,0,t)):e=r,e}}}function j(t,n,e,r){var i,s,u;for(i=t[e];e>n&&r(i,s=t[u=e-1>>1])<0;)t[e]=s,e=u;return t[e]=i}function N(){this.logger(n.logger()),this.logLevel(n.Error),this._clock=0,this._rank=0,this._locale=r.defaultLocale();try{this._loader=e.loader()}catch(t){}this._touched=i(n.id),this._input={},this._pulse=null,this._heap=U((t,n)=>t.qrank-n.qrank),this._postrun=[]}var G=N.prototype;function W(t){return function(){return this._log[t].apply(this,arguments)}}function B(t,n){y.call(this,t,null,n)}G.stamp=function(){return this._clock},G.loader=function(t){return arguments.length?(this._loader=t,this):this._loader},G.locale=function(t){return arguments.length?(this._locale=t,this):this._locale},G.cleanThreshold=1e4,G.add=function(t,e,r,i){var s,u=1;return t instanceof y?s=t:t&&t.prototype instanceof y?s=new t:n.isFunction(t)?s=new y(null,t):(u=0,s=new y(t,e)),this.rank(s),u&&(i=r,r=e),r&&this.connect(s,s.parameters(r,i)),this.touch(s),s},G.connect=function(t,n){var e,r,i=t.rank;for(e=0,r=n.length;e<r;++e)if(i<n[e].rank)return void this.rerank(t)},G.rank=function(t){t.rank=++this._rank},G.rerank=function(t){for(var e,r,i,s=[t];s.length;)if(this.rank(e=s.pop()),r=e._targets)for(i=r.length;--i>=0;)s.push(e=r[i]),e===t&&n.error("Cycle detected in dataflow graph.")},G.pulse=function(t,n,e){this.touch(t,e||I);var r=new M(this,this._clock+(this._pulse?0:1)),i=t.pulse&&t.pulse.source||[];return r.target=t,this._input[t.id]=n.pulse(r,i),this},G.touch=function(t,n){var e=n||I;return this._pulse?this._enqueue(t):this._touched.add(t),e.skip&&t.skip(!0),this},G.update=function(t,n,e){var r=e||I;return(t.set(n)||r.force)&&this.touch(t,r),this},G.changeset=d,G.ingest=function(t,n,e){return n=this.parse(n,e),this.pulse(t,this.changeset().insert(n))},G.parse=function(t,n){const r=this.locale();return e.read(t,n,r.timeParse,r.utcParse)},G.preload=async function(t,e,r){const i=this,s=i._pending||function(t){var n,e=new Promise((function(t){n=t}));return e.requests=0,e.done=function(){0==--e.requests&&(t._pending=null,n(t))},t._pending=e}(i);s.requests+=1;const u=await i.request(e,r);return i.pulse(t,i.changeset().remove(n.truthy).insert(u.data||[])),s.done(),u},G.request=async function(t,n){const r=this;let i,s=0;try{i=await r.loader().load(t,{context:"dataflow",response:e.responseType(n&&n.type)});try{i=r.parse(i,n)}catch(n){s=-2,r.warn("Data ingestion failed",t,n)}}catch(n){s=-1,r.warn("Loading failed",t,n)}return{data:i,status:s}},G.events=function(t,e,r,i){for(var s,u=this,a=D(r,i),o=function(t){t.dataflow=u;try{a.receive(t)}catch(t){u.error(t)}finally{u.run()}},l=0,h=(s="string"==typeof t&&"undefined"!=typeof document?document.querySelectorAll(t):n.array(t)).length;l<h;++l)s[l].addEventListener(e,o);return a},G.on=function(t,n,e,r,i){return(t instanceof y?b:E)(this,t,n,e,r,i),this},G.evaluate=async function(t,e,r){const u=this,a=u.logLevel(),o=[];if(u._pulse)return z(u);if(u._pending&&await u._pending,e&&await s(u,e),!u._touched.length)return u.info("Dataflow invoked, but nothing to do."),u;let l,h,c,f,d=++u._clock,p=0;u._pulse=new M(u,d,t),a>=n.Info&&(c=Date.now(),u.debug("-- START PROPAGATION ("+d+") -----")),u._touched.forEach(t=>u._enqueue(t,!0)),u._touched=i(n.id);try{for(;u._heap.size()>0;)l=u._heap.pop(),l.rank===l.qrank?(h=l.run(u._getPulse(l,t)),h.then?h=await h:h.async&&(o.push(h.async),h=q),a>=n.Debug&&u.debug(l.id,h===q?"STOP":h,l),h!==q&&l._targets&&l._targets.forEach(t=>u._enqueue(t)),++p):u._enqueue(l,!0)}catch(t){u._heap.clear(),f=t}if(u._input={},u._pulse=null,a>=n.Info&&(c=Date.now()-c,u.info("> Pulse "+d+": "+p+" operators; "+c+"ms")),f&&(u._postrun=[],u.error(f)),u._postrun.length){const t=u._postrun.sort((t,n)=>n.priority-t.priority);u._postrun=[];for(let n=0;n<t.length;++n)await s(u,t[n].callback)}return r&&await s(u,r),o.length&&Promise.all(o).then(t=>u.runAsync(null,()=>{t.forEach(t=>{try{t(u)}catch(t){u.error(t)}})})),u},G.run=function(t,n,e){return this._pulse?z(this):(this.evaluate(t,n,e),this)},G.runAsync=async function(t,n,e){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(t,n,e)).then(r,r),this._running},G.runAfter=function(t,n,e){if(this._pulse||n)this._postrun.push({priority:e||0,callback:t});else try{t(this)}catch(t){this.error(t)}},G._enqueue=function(t,n){var e=t.stamp<this._clock;e&&(t.stamp=this._clock),(e||n)&&(t.qrank=t.rank,this._heap.push(t))},G._getPulse=function(t,e){var r=t.source,i=this._clock;return r&&n.isArray(r)?new C(this,i,r.map(t=>t.pulse),e):this._input[t.id]||function(t,n){if(n&&n.stamp===t.stamp)return n;t=t.fork(),n&&n!==q&&(t.source=n.source);return t}(this._pulse,r&&r.pulse)},G.logger=function(t){return arguments.length?(this._log=t,this):this._log},G.error=W("error"),G.warn=W("warn"),G.info=W("info"),G.debug=W("debug"),G.logLevel=W("level");var H=n.inherits(B,y);H.run=function(t){return t.stamp<this.stamp?t.StopPropagation:(this.skip()?this.skip(!1):n=this.evaluate(t),(n=n||t).then?n=n.then(t=>this.pulse=t):n!==t.StopPropagation&&(this.pulse=n),n);var n},H.evaluate=function(t){var n=this.marshall(t.stamp),e=this.transform(n,t);return n.clear(),e},H.transform=function(){};var J={};function K(t){return t=t&&t.toLowerCase(),n.hasOwnProperty(J,t)?J[t]:null}t.Dataflow=N,t.EventStream=A,t.MultiPulse=C,t.Operator=y,t.Parameters=v,t.Pulse=M,t.Transform=B,t.UniqueList=i,t.asyncCallback=s,t.changeset=d,t.definition=function(t){var n=K(t);return n&&n.Definition||null},t.derive=function(t){return c(t,h({}))},t.ingest=h,t.isChangeSet=f,t.isTuple=function(t){return!(!t||!o(t))},t.rederive=c,t.replace=function(t,n){return l(n,o(t))},t.stableCompare=function(t,n){return t?n?(e,r)=>t(e,r)||o(n(e))-o(n(r)):(n,e)=>t(n,e)||o(n)-o(e):null},t.transform=K,t.transforms=J,t.tupleid=o,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vega-util"),require("vega-loader"),require("vega-format")):"function"==typeof define&&define.amd?define(["exports","vega-util","vega-loader","vega-format"],n):n((t=t||self).vega={},t.vega,t.vega,t.vega)}(this,(function(t,n,e,r){"use strict";function i(t){var e=t||n.identity,r=[],i={};return r.add=function(t){var n=e(t);return i[n]||(i[n]=1,r.push(t)),r},r.remove=function(t){var n,s=e(t);return i[s]&&(i[s]=0,(n=r.indexOf(t))>=0&&r.splice(n,1)),r},r}async function s(t,n){try{await n(t)}catch(n){t.error(n)}}var a=Symbol("vega_id"),u=1;function o(t){return t[a]}function l(t,n){return t[a]=n,t}function c(t){var n=t===Object(t)?t:{data:t};return o(n)?n:l(n,u++)}function h(t,n){for(var e in t)n[e]=t[e];return n}function f(t){return t&&t.constructor===d}function d(){var t=[],e=[],r=[],i=[],s=[],a=null,u=!1;return{constructor:d,insert:function(e){for(var r=n.array(e),i=0,s=r.length;i<s;++i)t.push(r[i]);return this},remove:function(t){for(var r=n.isFunction(t)?i:e,s=n.array(t),a=0,u=s.length;a<u;++a)r.push(s[a]);return this},modify:function(t,e,i){var a={field:e,value:n.constant(i)};return n.isFunction(t)?(a.filter=t,s.push(a)):(a.tuple=t,r.push(a)),this},encode:function(t,e){return n.isFunction(t)?s.push({filter:t,field:e}):r.push({tuple:t,field:e}),this},clean:function(t){return a=t,this},reflow:function(){return u=!0,this},pulse:function(n,l){var h,f,d,p,g,v,m={},_={};for(h=0,f=l.length;h<f;++h)m[o(l[h])]=1;for(h=0,f=e.length;h<f;++h)m[o(g=e[h])]=-1;for(h=0,f=i.length;h<f;++h)p=i[h],l.forEach((function(t){p(t)&&(m[o(t)]=-1)}));for(h=0,f=t.length;h<f;++h)v=o(g=t[h]),m[v]?m[v]=1:n.add.push(c(t[h]));for(h=0,f=l.length;h<f;++h)g=l[h],m[o(g)]<0&&n.rem.push(g);function y(t,e,r){r?t[e]=r(t):n.encode=e,u||(_[o(t)]=t)}for(h=0,f=r.length;h<f;++h)g=(d=r[h]).tuple,p=d.field,(v=m[o(g)])>0&&(y(g,p,d.value),n.modifies(p));for(h=0,f=s.length;h<f;++h)d=s[h],p=d.filter,l.forEach((function(t){p(t)&&m[o(t)]>0&&y(t,d.field,d.value)})),n.modifies(d.field);if(u)n.mod=e.length||i.length?l.filter((function(t){return m[o(t)]>0})):l.slice();else for(v in _)n.mod.push(_[v]);return(a||null==a&&(e.length||i.length))&&n.clean(!0),n}}}var p="_:mod:_";function g(){Object.defineProperty(this,p,{writable:!0,value:{}})}var v=g.prototype;v.set=function(t,e,r,i){var s=this,a=s[t],u=s[p];return null!=e&&e>=0?(a[e]!==r||i)&&(a[e]=r,u[e+":"+t]=-1,u[t]=-1):(a!==r||i)&&(s[t]=r,u[t]=n.isArray(r)?1+r.length:-1),s},v.modified=function(t,e){var r,i=this[p];if(!arguments.length){for(r in i)if(i[r])return!0;return!1}if(n.isArray(t)){for(r=0;r<t.length;++r)if(i[t[r]])return!0;return!1}return null!=e&&e>=0?e+1<i[t]||!!i[e+":"+t]:!!i[t]},v.clear=function(){return this[p]={},this};var m=0,_=new g;function y(t,n,e,r){this.id=++m,this.value=t,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,n&&(this._update=n),e&&this.parameters(e,r)}var k=y.prototype;function w(t){return function(n){var e=this.flags;return 0===arguments.length?!!(e&t):(this.flags=n?e|t:e&~t,this)}}k.targets=function(){return this._targets||(this._targets=i(n.id))},k.set=function(t){return this.value!==t?(this.value=t,1):0},k.skip=w(1),k.modified=w(2),k.parameters=function(t,e,r){e=!1!==e;var i,s,a,u,o=this,l=o._argval=o._argval||new g,c=o._argops=o._argops||[],h=[];function f(t,n,r){r instanceof y?(r!==o&&(e&&r.targets().add(o),h.push(r)),c.push({op:r,name:t,index:n})):l.set(t,n,r)}for(i in t)if(s=t[i],"pulse"===i)n.array(s).forEach((function(t){t instanceof y?t!==o&&(t.targets().add(o),h.push(t)):n.error("Pulse parameters must be operator instances.")})),o.source=s;else if(n.isArray(s))for(l.set(i,-1,Array(a=s.length)),u=0;u<a;++u)f(i,u,s[u]);else f(i,-1,s);return this.marshall().clear(),r&&(c.initonly=!0),h},k.marshall=function(t){var n,e,r,i,s,a=this._argval||_,u=this._argops;if(u){for(e=0,r=u.length;e<r;++e)s=(i=(n=u[e]).op).modified()&&i.stamp===t,a.set(n.name,n.index,i.value,s);if(u.initonly){for(e=0;e<r;++e)(n=u[e]).op.targets().remove(this);this._argops=null,this._update=null}}return a},k.detach=function(){var t,n,e,r=this._argops;if(r)for(t=0,n=r.length;t<n;++t)(e=r[t].op)._targets&&e._targets.remove(this)},k.evaluate=function(t){var n=this._update;if(n){var e=this.marshall(t.stamp),r=n.call(this,e,t);if(e.clear(),r!==this.value)this.value=r;else if(!this.modified())return t.StopPropagation}},k.run=function(t){return t.stamp<this.stamp?t.StopPropagation:(this.skip()?(this.skip(!1),n=0):n=this.evaluate(t),this.pulse=n||t);var n};var F=0;function A(t,n,e){this.id=++F,this.value=null,e&&(this.receive=e),t&&(this._filter=t),n&&(this._apply=n)}function D(t,n,e){return new A(t,n,e)}var E=A.prototype;E._filter=n.truthy,E._apply=n.identity,E.targets=function(){return this._targets||(this._targets=i(n.id))},E.consume=function(t){return arguments.length?(this._consume=!!t,this):!!this._consume},E.receive=function(t){if(this._filter(t)){for(var n=this.value=this._apply(t),e=this._targets,r=e?e.length:0,i=0;i<r;++i)e[i].receive(n);this._consume&&(t.preventDefault(),t.stopPropagation())}},E.filter=function(t){var n=D(t);return this.targets().add(n),n},E.apply=function(t){var n=D(null,t);return this.targets().add(n),n},E.merge=function(){var t=D();this.targets().add(t);for(var n=0,e=arguments.length;n<e;++n)arguments[n].targets().add(t);return t},E.throttle=function(t){var n=-1;return this.filter((function(){var e=Date.now();return e-n>t?(n=e,1):0}))},E.debounce=function(t){var e=D();return this.targets().add(D(null,null,n.debounce(t,(function(t){var n=t.dataflow;e.receive(t),n&&n.run&&n.run()})))),e},E.between=function(t,n){var e=!1;return t.targets().add(D(null,null,(function(){e=!0}))),n.targets().add(D(null,null,(function(){e=!1}))),this.filter((function(){return e}))};var P={skip:!0};function q(t,e,r,i,s,a){var u,o,l=n.extend({},a,P);n.isFunction(r)||(r=n.constant(r)),void 0===i?u=n=>t.touch(r(n)):n.isFunction(i)?(o=new y(null,i,s,!1),u=n=>{o.evaluate(n);const e=r(n),i=o.value;f(i)?t.pulse(e,i,a):t.update(e,i,l)}):u=n=>t.update(r(n),i,l),e.apply(u)}function O(t,e,r,i,s,a){if(void 0===i)e.targets().add(r);else{const u=a||{},o=new y(null,function(t,e){return e=n.isFunction(e)?e:n.constant(e),t?function(n,r){const i=e(n,r);return t.skip()||(t.skip(i!==this.value).value=i),i}:e}(r,i),s,!1);o.modified(u.force),o.rank=e.rank,e.targets().add(o),r&&(o.skip(!0),o.value=r.value,o.targets().add(r),t.connect(r,[o]))}}const b={};function M(t,n,e){this.dataflow=t,this.stamp=null==n?-1:n,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=e||null}const S=M.prototype;function L(t,n){return t?(e,r)=>t(e,r)&&n(e,r):n}function R(t,e){var r=[];return n.visitArray(t,e,t=>r.push(t)),r}function x(t,n){var e={};return t.visit(n,(function(t){e[o(t)]=1})),t=>e[o(t)]?null:t}function C(t,n,e,r){var i,s,a,u,o,l=this,c=0;for(this.dataflow=t,this.stamp=n,this.fields=null,this.encode=r||null,this.pulses=e,a=0,u=e.length;a<u;++a)if((i=e[a]).stamp===n){if(i.fields)for(o in s=l.fields||(l.fields={}),i.fields)s[o]=1;i.changed(l.ADD)&&(c|=l.ADD),i.changed(l.REM)&&(c|=l.REM),i.changed(l.MOD)&&(c|=l.MOD)}this.changes=c}S.StopPropagation=b,S.ADD=1,S.REM=2,S.MOD=4,S.ADD_REM=3,S.ADD_MOD=5,S.ALL=7,S.REFLOW=8,S.SOURCE=16,S.NO_SOURCE=32,S.NO_FIELDS=64,S.fork=function(t){return new M(this.dataflow).init(this,t)},S.clone=function(){const t=this.fork(7);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(23)},S.addAll=function(){let t=this;return t.source&&t.source.length!==t.add.length?(t=new M(this.dataflow).init(this),t.add=t.source,t):t},S.init=function(t,n){const e=this;return e.stamp=t.stamp,e.encode=t.encode,!t.fields||64&n||(e.fields=t.fields),1&n?(e.addF=t.addF,e.add=t.add):(e.addF=null,e.add=[]),2&n?(e.remF=t.remF,e.rem=t.rem):(e.remF=null,e.rem=[]),4&n?(e.modF=t.modF,e.mod=t.mod):(e.modF=null,e.mod=[]),32&n?(e.srcF=null,e.source=null):(e.srcF=t.srcF,e.source=t.source,t.cleans&&(e.cleans=t.cleans)),e},S.runAfter=function(t){this.dataflow.runAfter(t)},S.changed=function(t){var n=t||7;return 1&n&&this.add.length||2&n&&this.rem.length||4&n&&this.mod.length},S.reflow=function(t){if(t)return this.fork(7).reflow();var n=this.add.length,e=this.source&&this.source.length;return e&&e!==n&&(this.mod=this.source,n&&this.filter(4,x(this,1))),this},S.clean=function(t){return arguments.length?(this.cleans=!!t,this):this.cleans},S.modifies=function(t){var e=this.fields||(this.fields={});return n.isArray(t)?t.forEach(t=>e[t]=!0):e[t]=!0,this},S.modified=function(t,e){var r=this.fields;return!(!e&&!this.mod.length||!r)&&(arguments.length?n.isArray(t)?t.some(t=>r[t]):r[t]:!!r)},S.filter=function(t,n){var e=this;return 1&t&&(e.addF=L(e.addF,n)),2&t&&(e.remF=L(e.remF,n)),4&t&&(e.modF=L(e.modF,n)),16&t&&(e.srcF=L(e.srcF,n)),e},S.materialize=function(t){var n=this;return 1&(t=t||7)&&n.addF&&(n.add=R(n.add,n.addF),n.addF=null),2&t&&n.remF&&(n.rem=R(n.rem,n.remF),n.remF=null),4&t&&n.modF&&(n.mod=R(n.mod,n.modF),n.modF=null),16&t&&n.srcF&&(n.source=n.source.filter(n.srcF),n.srcF=null),n},S.visit=function(t,e){var r,i,s=this,a=e;return 16&t?(n.visitArray(s.source,s.srcF,a),s):(1&t&&n.visitArray(s.add,s.addF,a),2&t&&n.visitArray(s.rem,s.remF,a),4&t&&n.visitArray(s.mod,s.modF,a),8&t&&(r=s.source)&&((i=s.add.length+s.mod.length)===r.length||(i?n.visitArray(r,x(s,5),a):n.visitArray(r,s.srcF,a))),s)};var z=n.inherits(C,M);function U(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}z.fork=function(t){var n=new M(this.dataflow).init(this,t&this.NO_FIELDS);return void 0!==t&&(t&n.ADD&&this.visit(n.ADD,(function(t){return n.add.push(t)})),t&n.REM&&this.visit(n.REM,(function(t){return n.rem.push(t)})),t&n.MOD&&this.visit(n.MOD,(function(t){return n.mod.push(t)}))),n},z.changed=function(t){return this.changes&t},z.modified=function(t){var e=this,r=e.fields;return r&&e.changes&e.MOD?n.isArray(t)?t.some((function(t){return r[t]})):r[t]:0},z.filter=function(){n.error("MultiPulse does not support filtering.")},z.materialize=function(){n.error("MultiPulse does not support materialization.")},z.visit=function(t,n){var e=this,r=e.pulses,i=r.length,s=0;if(t&e.SOURCE)for(;s<i;++s)r[s].visit(t,n);else for(;s<i;++s)r[s].stamp===e.stamp&&r[s].visit(t,n);return e};var j={skip:!1,force:!1};function T(t){var n=[];return{clear:()=>n=[],size:()=>n.length,peek:()=>n[0],push:e=>(n.push(e),N(n,0,n.length-1,t)),pop:()=>{var e,r=n.pop();return n.length?(e=n[0],n[0]=r,function(t,n,e){var r,i=n,s=t.length,a=t[n],u=1+(n<<1);for(;u<s;)(r=u+1)<s&&e(t[u],t[r])>=0&&(u=r),t[n]=t[u],u=1+((n=u)<<1);t[n]=a,N(t,i,n,e)}(n,0,t)):e=r,e}}}function N(t,n,e,r){var i,s,a;for(i=t[e];e>n&&r(i,s=t[a=e-1>>1])<0;)t[e]=s,e=a;return t[e]=i}function I(){this.logger(n.logger()),this.logLevel(n.Error),this._clock=0,this._rank=0,this._locale=r.defaultLocale();try{this._loader=e.loader()}catch(t){}this._touched=i(n.id),this._input={},this._pulse=null,this._heap=T((t,n)=>t.qrank-n.qrank),this._postrun=[]}var $=I.prototype;function W(t){return function(){return this._log[t].apply(this,arguments)}}function B(t,n){y.call(this,t,null,n)}$.stamp=function(){return this._clock},$.loader=function(t){return arguments.length?(this._loader=t,this):this._loader},$.locale=function(t){return arguments.length?(this._locale=t,this):this._locale},$.cleanThreshold=1e4,$.add=function(t,e,r,i){var s,a=1;return t instanceof y?s=t:t&&t.prototype instanceof y?s=new t:n.isFunction(t)?s=new y(null,t):(a=0,s=new y(t,e)),this.rank(s),a&&(i=r,r=e),r&&this.connect(s,s.parameters(r,i)),this.touch(s),s},$.connect=function(t,n){var e,r,i=t.rank;for(e=0,r=n.length;e<r;++e)if(i<n[e].rank)return void this.rerank(t)},$.rank=function(t){t.rank=++this._rank},$.rerank=function(t){for(var e,r,i,s=[t];s.length;)if(this.rank(e=s.pop()),r=e._targets)for(i=r.length;--i>=0;)s.push(e=r[i]),e===t&&n.error("Cycle detected in dataflow graph.")},$.pulse=function(t,n,e){this.touch(t,e||j);var r=new M(this,this._clock+(this._pulse?0:1)),i=t.pulse&&t.pulse.source||[];return r.target=t,this._input[t.id]=n.pulse(r,i),this},$.touch=function(t,n){var e=n||j;return this._pulse?this._enqueue(t):this._touched.add(t),e.skip&&t.skip(!0),this},$.update=function(t,n,e){var r=e||j;return(t.set(n)||r.force)&&this.touch(t,r),this},$.changeset=d,$.ingest=function(t,n,e){return n=this.parse(n,e),this.pulse(t,this.changeset().insert(n))},$.parse=function(t,n){const r=this.locale();return e.read(t,n,r.timeParse,r.utcParse)},$.preload=async function(t,e,r){const i=this,s=i._pending||function(t){var n,e=new Promise((function(t){n=t}));return e.requests=0,e.done=function(){0==--e.requests&&(t._pending=null,n(t))},t._pending=e}(i);s.requests+=1;const a=await i.request(e,r);return i.pulse(t,i.changeset().remove(n.truthy).insert(a.data||[])),s.done(),a},$.request=async function(t,n){const r=this;let i,s=0;try{i=await r.loader().load(t,{context:"dataflow",response:e.responseType(n&&n.type)});try{i=r.parse(i,n)}catch(n){s=-2,r.warn("Data ingestion failed",t,n)}}catch(n){s=-1,r.warn("Loading failed",t,n)}return{data:i,status:s}},$.events=function(t,e,r,i){for(var s,a=this,u=D(r,i),o=function(t){t.dataflow=a;try{u.receive(t)}catch(t){a.error(t)}finally{a.run()}},l=0,c=(s="string"==typeof t&&"undefined"!=typeof document?document.querySelectorAll(t):n.array(t)).length;l<c;++l)s[l].addEventListener(e,o);return u},$.on=function(t,n,e,r,i){return(t instanceof y?O:q)(this,t,n,e,r,i),this},$.evaluate=async function(t,e,r){const a=this,u=[];if(a._pulse)return U(a);if(a._pending&&await a._pending,e&&await s(a,e),!a._touched.length)return a.debug("Dataflow invoked, but nothing to do."),a;const o=++a._clock;a._pulse=new M(a,o,t),a._touched.forEach(t=>a._enqueue(t,!0)),a._touched=i(n.id);let l,c,h,f=0;try{for(;a._heap.size()>0;)l=a._heap.pop(),l.rank===l.qrank?(c=l.run(a._getPulse(l,t)),c.then?c=await c:c.async&&(u.push(c.async),c=b),c!==b&&l._targets&&l._targets.forEach(t=>a._enqueue(t)),++f):a._enqueue(l,!0)}catch(t){a._heap.clear(),h=t}if(a._input={},a._pulse=null,a.debug(`Pulse ${o}: ${f} operators`),h&&(a._postrun=[],a.error(h)),a._postrun.length){const t=a._postrun.sort((t,n)=>n.priority-t.priority);a._postrun=[];for(let n=0;n<t.length;++n)await s(a,t[n].callback)}return r&&await s(a,r),u.length&&Promise.all(u).then(t=>a.runAsync(null,()=>{t.forEach(t=>{try{t(a)}catch(t){a.error(t)}})})),a},$.run=function(t,n,e){return this._pulse?U(this):(this.evaluate(t,n,e),this)},$.runAsync=async function(t,n,e){for(;this._running;)await this._running;const r=()=>this._running=null;return(this._running=this.evaluate(t,n,e)).then(r,r),this._running},$.runAfter=function(t,n,e){if(this._pulse||n)this._postrun.push({priority:e||0,callback:t});else try{t(this)}catch(t){this.error(t)}},$._enqueue=function(t,n){var e=t.stamp<this._clock;e&&(t.stamp=this._clock),(e||n)&&(t.qrank=t.rank,this._heap.push(t))},$._getPulse=function(t,e){var r=t.source,i=this._clock;return r&&n.isArray(r)?new C(this,i,r.map(t=>t.pulse),e):this._input[t.id]||function(t,n){if(n&&n.stamp===t.stamp)return n;t=t.fork(),n&&n!==b&&(t.source=n.source);return t}(this._pulse,r&&r.pulse)},$.logger=function(t){return arguments.length?(this._log=t,this):this._log},$.error=W("error"),$.warn=W("warn"),$.info=W("info"),$.debug=W("debug"),$.logLevel=W("level");var G=n.inherits(B,y);G.run=function(t){return t.stamp<this.stamp?t.StopPropagation:(this.skip()?this.skip(!1):n=this.evaluate(t),(n=n||t).then?n=n.then(t=>this.pulse=t):n!==t.StopPropagation&&(this.pulse=n),n);var n},G.evaluate=function(t){var n=this.marshall(t.stamp),e=this.transform(n,t);return n.clear(),e},G.transform=function(){};var H={};function J(t){return t=t&&t.toLowerCase(),n.hasOwnProperty(H,t)?H[t]:null}t.Dataflow=I,t.EventStream=A,t.MultiPulse=C,t.Operator=y,t.Parameters=g,t.Pulse=M,t.Transform=B,t.UniqueList=i,t.asyncCallback=s,t.changeset=d,t.definition=function(t){var n=J(t);return n&&n.Definition||null},t.derive=function(t){return h(t,c({}))},t.ingest=c,t.isChangeSet=f,t.isTuple=function(t){return!(!t||!o(t))},t.rederive=h,t.replace=function(t,n){return l(n,o(t))},t.stableCompare=function(t,n){return t?n?(e,r)=>t(e,r)||o(n(e))-o(n(r)):(n,e)=>t(n,e)||o(n)-o(e):null},t.transform=J,t.transforms=H,t.tupleid=o,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "vega-dataflow",
"version": "5.6.0",
"version": "5.7.0",
"description": "Reactive dataflow processing.",

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

},
"gitHead": "48c85218f2202242171aa569f2dca0f53cf2b51f"
"gitHead": "62565bbe084a422c4a0cbc6e19c6f7c45a3e5137"
}

@@ -14,2 +14,3 @@ import {ingest, tupleid} from './Tuple';

modp = [], // modify by predicate
clean = null,
reflow = false;

@@ -46,2 +47,6 @@

},
clean: function(value) {
clean = value;
return this;
},
reflow: function() {

@@ -137,2 +142,7 @@ reflow = true;

// set pulse garbage collection request
if (clean || clean == null && (rem.length || remp.length)) {
pulse.clean(true);
}
return pulse;

@@ -139,0 +149,0 @@ }

@@ -6,3 +6,3 @@ /* eslint-disable require-atomic-updates */

import UniqueList from '../util/UniqueList';
import {Debug, Info, id, isArray} from 'vega-util';
import {id, isArray} from 'vega-util';

@@ -31,3 +31,2 @@ /**

const df = this,
level = df.logLevel(),
async = [];

@@ -39,5 +38,3 @@

// wait for pending datasets to load
if (df._pending) {
await df._pending;
}
if (df._pending) await df._pending;

@@ -49,3 +46,3 @@ // invoke prerun function, if provided

if (!df._touched.length) {
df.info('Dataflow invoked, but nothing to do.');
df.debug('Dataflow invoked, but nothing to do.');
return df;

@@ -55,4 +52,3 @@ }

// increment timestamp clock
let stamp = ++df._clock,
count = 0, op, next, dt, error;
const stamp = ++df._clock;

@@ -62,7 +58,2 @@ // set the current pulse

if (level >= Info) {
dt = Date.now();
df.debug('-- START PROPAGATION (' + stamp + ') -----');
}
// initialize priority queue, reset touched operators

@@ -72,2 +63,4 @@ df._touched.forEach(op => df._enqueue(op, true));

let count = 0, op, next, error;
try {

@@ -79,3 +72,6 @@ while (df._heap.size() > 0) {

// re-queue if rank changed
if (op.rank !== op.qrank) { df._enqueue(op, true); continue; }
if (op.rank !== op.qrank) {
df._enqueue(op, true);
continue;
}

@@ -94,6 +90,2 @@ // otherwise, evaluate the operator

if (level >= Debug) {
df.debug(op.id, next === StopPropagation ? 'STOP' : next, op);
}
// propagate evaluation, enqueue dependent operators

@@ -116,6 +108,3 @@ if (next !== StopPropagation) {

if (level >= Info) {
dt = Date.now() - dt;
df.info('> Pulse ' + stamp + ': ' + count + ' operators; ' + dt + 'ms');
}
df.debug(`Pulse ${stamp}: ${count} operators`);

@@ -141,5 +130,6 @@ if (error) {

if (async.length) {
Promise.all(async).then(cb => df.runAsync(null, () => {
cb.forEach(f => { try { f(df); } catch (err) { df.error(err); } });
}));
Promise.all(async)
.then(cb => df.runAsync(null, () => {
cb.forEach(f => { try { f(df); } catch (err) { df.error(err); } });
}));
}

@@ -146,0 +136,0 @@

@@ -191,2 +191,21 @@ import Parameters from './Parameters';

/**
* Detach this operator from the dataflow.
* Unregisters listeners on upstream dependencies.
*/
prototype.detach = function() {
var argops = this._argops,
i, n, item, op;
if (argops) {
for (i=0, n=argops.length; i<n; ++i) {
item = argops[i];
op = item.op;
if (op._targets) {
op._targets.remove(this);
}
}
}
};
/**
* Delegate method to perform operator processing.

@@ -193,0 +212,0 @@ * Subclasses can override this method to perform custom processing.

@@ -7,15 +7,15 @@ import {tupleid} from './Tuple';

*/
export var StopPropagation = {};
export const StopPropagation = {};
// Pulse visit type flags
var ADD = (1 << 0),
REM = (1 << 1),
MOD = (1 << 2),
ADD_REM = ADD | REM,
ADD_MOD = ADD | MOD,
ALL = ADD | REM | MOD,
REFLOW = (1 << 3),
SOURCE = (1 << 4),
NO_SOURCE = (1 << 5),
NO_FIELDS = (1 << 6);
const ADD = (1 << 0),
REM = (1 << 1),
MOD = (1 << 2),
ADD_REM = ADD | REM,
ADD_MOD = ADD | MOD,
ALL = ADD | REM | MOD,
REFLOW = (1 << 3),
SOURCE = (1 << 4),
NO_SOURCE = (1 << 5),
NO_FIELDS = (1 << 6);

@@ -55,3 +55,3 @@ /**

var prototype = Pulse.prototype;
const prototype = Pulse.prototype;

@@ -140,3 +140,3 @@ /**

prototype.clone = function() {
var p = this.fork(ALL);
const p = this.fork(ALL);
p.add = p.add.slice();

@@ -160,4 +160,4 @@ p.rem = p.rem.slice();

prototype.addAll = function() {
var p = this;
if (!this.source || this.source.length === this.add.length) {
let p = this;
if (!p.source || p.source.length === p.add.length) {
return p;

@@ -185,3 +185,3 @@ } else {

prototype.init = function(src, flags) {
var p = this;
const p = this;
p.stamp = src.stamp;

@@ -224,2 +224,3 @@ p.encode = src.encode;

p.source = src.source;
if (src.cleans) p.cleans = src.cleans;
}

@@ -272,2 +273,15 @@

/**
* Get/set metadata to pulse requesting garbage collection
* to reclaim currently unused resources.
*/
prototype.clean = function(value) {
if (arguments.length) {
this.cleans = !!value;
return this;
} else {
return this.cleans;
}
};
/**
* Marks one or more data field names as modified to assist dependency

@@ -301,3 +315,3 @@ * tracking and incremental processing by transform operators.

: !arguments.length ? !!fields
: isArray(_) ? _.some(function(f) { return fields[f]; })
: isArray(_) ? _.some(f => fields[f])
: fields[_];

@@ -331,3 +345,5 @@ };

function addFilter(a, b) {
return a ? function(t,i) { return a(t,i) && b(t,i); } : b;
return a
? (t, i) => a(t, i) && b(t, i)
: b;
}

@@ -366,3 +382,3 @@

var out = [];
visitArray(data, filter, function(_) { out.push(_); });
visitArray(data, filter, _ => out.push(_));
return out;

@@ -374,3 +390,3 @@ }

pulse.visit(flags, function(t) { map[tupleid(t)] = 1; });
return function(t) { return map[tupleid(t)] ? null : t; };
return t => map[tupleid(t)] ? null : t;
}

@@ -377,0 +393,0 @@

Sorry, the diff of this file is too big to display

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