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

vega-util

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-util - npm Package Compare versions

Comparing version 1.12.0 to 1.12.1

10

build/vega-util.js

@@ -5,3 +5,3 @@ (function (global, factory) {

(global = global || self, factory(global.vega = {}));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';

@@ -458,3 +458,3 @@ function accessor(fn, fields, name) {

// find first valid value
for (v = array[i]; v == null || v !== v; v = array[++i]);
for (v = array[i]; i < n && (v == null || v !== v); v = array[++i]);
min = max = v;

@@ -473,3 +473,3 @@

// find first valid value
for (v = f(array[i]); v == null || v !== v; v = f(array[++i]));
for (v = f(array[i]); i < n && (v == null || v !== v); v = f(array[++i]));
min = max = v;

@@ -505,2 +505,3 @@

}
if (i === n) return [-1, -1];
u = v = i;

@@ -528,2 +529,3 @@ while (++i < n) {

}
if (i === n) return [-1, -1];
u = v = i;

@@ -882,2 +884,2 @@ while (++i < n) {

}));
})));

2

build/vega-util.min.js

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

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).vega={})}(this,(function(n){"use strict";function t(n,t,r){return n.fields=t||[],n.fname=r,n}function r(n){return null==n?null:n.fields}function e(n){throw Error(n)}function u(n){var t,r,u,o=[],i=null,c=0,f=n.length,l="";function a(){o.push(l+n.substring(t,r)),l="",t=r+1}for(n+="",t=r=0;r<f;++r)if("\\"===(u=n[r]))l+=n.substring(t,r),t=++r;else if(u===i)a(),i=null,c=-1;else{if(i)continue;t===c&&'"'===u?(t=r+1,i=u):t===c&&"'"===u?(t=r+1,i=u):"."!==u||c?"["===u?(r>t&&a(),c=t=r+1):"]"===u&&(c||e("Access path missing open bracket: "+n),c>0&&a(),c=0,t=r+1):r>t?a():t=r+1}return c&&e("Access path missing closing bracket: "+n),i&&e("Access path missing closing quote: "+n),r>t&&(r++,a()),o}var o=Array.isArray;function i(n){return n===Object(n)}function c(n){return"string"==typeof n}function f(n){return o(n)?"["+n.map(f)+"]":i(n)||c(n)?JSON.stringify(n).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):n}function l(n,r){var e=u(n),o="return _["+e.map(f).join("][")+"];";return t(Function("_",o),[n=1===e.length?e[0]:n],r||n)}var a=[],s=l("id"),h=t((function(n){return n}),a,"identity"),p=t((function(){return 0}),a,"zero"),g=t((function(){return 1}),a,"one"),v=t((function(){return!0}),a,"true"),m=t((function(){return!1}),a,"false");function y(n,t,r){var e=[t].concat([].slice.call(r));console[n].apply(console,e)}var b=0,d=1,M=2,j=3,O=4;function w(n,t,r,e){var u,c;if(i(r)&&!o(r))for(u in c=i(n[t])?n[t]:n[t]={},r)e&&(!0===e||e[u])?w(c,u,r[u]):c[u]=r[u];else n[t]=r}function x(n,t){if(null==n)return t;const r={},e=[];function u(n){r[n.name]||(r[n.name]=1,e.push(n))}return t.forEach(u),n.forEach(u),e}function z(n){return n[n.length-1]}function E(n){return null==n||""===n?null:+n}function D(n){return function(t){return n*Math.exp(t)}}function k(n){return function(t){return Math.log(n*t)}}function A(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function S(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function N(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function R(n,t,r,e){var u=r(n[0]),o=r(z(n)),i=(o-u)*t;return[e(u-i),e(o-i)]}function F(n,t,r,e,u){var o=e(n[0]),i=e(z(n)),c=null!=t?e(t):(o+i)/2;return[u(c+(o-c)*r),u(c+(i-c)*r)]}function P(n){return null!=n?o(n)?n:[n]:[]}function _(n){return"function"==typeof n}const L=Object.prototype.hasOwnProperty;function q(n,t){return L.call(n,t)}var B={};function C(n){return"[object Date]"===Object.prototype.toString.call(n)}function I(n){return"number"==typeof n}function T(n,t){for(var r="";--t>=0;)r+=n;return r}function U(n){return I(n)?n:C(n)?n:Date.parse(n)}n.Debug=O,n.Error=d,n.Info=j,n.None=b,n.Warn=M,n.accessor=t,n.accessorFields=r,n.accessorName=function(n){return null==n?null:n.fname},n.array=P,n.clampRange=function(n,t,r){var e,u=n[0],o=n[1];return o<u&&(e=o,o=u,u=e),(e=o-u)>=r-t?[t,r]:[u=Math.min(Math.max(u,t),r-e),u+e]},n.compare=function(n,e){var o,i,c,l,a,s,h,p,g,v=[],m=(n=P(n)).map((function(n,t){return null==n?null:(v.push(t),_(n)?n:u(n).map(f).join("]["))})),y=v.length-1,b=P(e),d="var u,v;return ";if(y<0)return null;for(i=0;i<=y;++i)_(c=m[o=v[i]])?(l="(u=this."+(s="f"+o)+"(a))",a="(v=this."+s+"(b))",(h=h||{})[s]=c):(l="(u=a["+c+"])",a="(v=b["+c+"])"),s="((v=v instanceof Date?+v:v),(u=u instanceof Date?+u:u))","descending"!==b[o]?(g=1,p=-1):(g=-1,p=1),d+="("+l+"<"+a+"||u==null)&&v!=null?"+p+":(u>v||v==null)&&u!=null?"+g+":"+s+"!==u&&v===v?"+p+":v!==v&&u===u?"+g+(o<y?":":":0");return c=Function("a","b",d+";"),h&&(c=c.bind(h)),n=n.reduce((function(n,t){return _(t)?(r(t)||[]).forEach((function(t){n[t]=1})):null!=t&&(n[t+""]=1),n}),{}),t(c,Object.keys(n))},n.constant=function(n){return _(n)?n:function(){return n}},n.debounce=function(n,t){var r,e;function u(){t(e),r=e=null}return function(t){e=t,r&&clearTimeout(r),r=setTimeout(u,n)}},n.error=e,n.extend=function(n){for(var t,r,e=1,u=arguments.length;e<u;++e)for(r in t=arguments[e])n[r]=t[r];return n},n.extent=function(n,t){var r,e,u,o,i=0;if(n&&(r=n.length))if(null==t){for(e=n[i];null==e||e!=e;e=n[++i]);for(u=o=e;i<r;++i)null!=(e=n[i])&&(e<u&&(u=e),e>o&&(o=e))}else{for(e=t(n[i]);null==e||e!=e;e=t(n[++i]));for(u=o=e;i<r;++i)null!=(e=t(n[i]))&&(e<u&&(u=e),e>o&&(o=e))}return[u,o]},n.extentIndex=function(n,t){var r,e,u,o,i,c=-1,f=n.length;if(null==t){for(;++c<f;)if(null!=(e=n[c])&&e>=e){r=u=e;break}for(o=i=c;++c<f;)null!=(e=n[c])&&(r>e&&(r=e,o=c),u<e&&(u=e,i=c))}else{for(;++c<f;)if(null!=(e=t(n[c],c,n))&&e>=e){r=u=e;break}for(o=i=c;++c<f;)null!=(e=t(n[c],c,n))&&(r>e&&(r=e,o=c),u<e&&(u=e,i=c))}return[o,i]},n.falsy=m,n.fastmap=function(n){var t,r,e={};function u(n){return q(e,n)&&e[n]!==B}return t={size:0,empty:0,object:e,has:u,get:function(n){return u(n)?e[n]:void 0},set:function(n,r){return u(n)||(++t.size,e[n]===B&&--t.empty),e[n]=r,this},delete:function(n){return u(n)&&(--t.size,++t.empty,e[n]=B),this},clear:function(){t.size=t.empty=0,t.object=e={}},test:function(n){return arguments.length?(r=n,t):r},clean:function(){var n,u,o={},i=0;for(n in e)(u=e[n])===B||r&&r(u)||(o[n]=u,++i);t.size=i,t.empty=0,t.object=e=o}},n&&Object.keys(n).forEach((function(r){t.set(r,n[r])})),t},n.field=l,n.flush=function(n,t,r,e,u,o){if(!r&&0!==r)return o;var i,c,f=n[0],l=z(n),a=+r;return l<f&&(i=f,f=l,l=i),(i=Math.abs(t-f))<(c=Math.abs(l-t))&&i<=a?e:c<=a?u:o},n.hasOwnProperty=q,n.id=s,n.identity=h,n.inherits=function(n,t){var r=n.prototype=Object.create(t.prototype);return r.constructor=n,r},n.inrange=function(n,t,r,e){var u,o=t[0],i=t[t.length-1];return o>i&&(u=o,o=i,i=u),e=void 0===e||e,((r=void 0===r||r)?o<=n:o<n)&&(e?n<=i:n<i)},n.isArray=o,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=C,n.isFunction=_,n.isNumber=I,n.isObject=i,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=c,n.key=function(n,r){return n&&(n=r?P(n).map((function(n){return n.replace(/\\(.)/g,"$1")})):P(n)),t(n&&n.length?Function("_","return ''+"+n.map((function(n){return"_["+(r?f(n):u(n).map(f).join("]["))+"]"})).join("+'|'+")+";"):function(){return""},n,"key")},n.lerp=function(n,t){const r=n[0],e=z(n),u=+t;return u?1===u?e:r+u*(e-r):r},n.logger=function(n,t){var r=n||b;return{level:function(n){return arguments.length?(r=+n,this):r},error:function(){return r>=d&&y(t||"error","ERROR",arguments),this},warn:function(){return r>=M&&y(t||"warn","WARN",arguments),this},info:function(){return r>=j&&y(t||"log","INFO",arguments),this},debug:function(){return r>=O&&y(t||"log","DEBUG",arguments),this}}},n.merge=function(n,t,r,e){var u=t.length,o=r.length;if(!o)return t;if(!u)return r;for(var i=e||new t.constructor(u+o),c=0,f=0,l=0;c<u&&f<o;++l)i[l]=n(t[c],r[f])>0?r[f++]:t[c++];for(;c<u;++c,++l)i[l]=t[c];for(;f<o;++f,++l)i[l]=r[f];return i},n.mergeConfig=function(...n){return n.reduce((n,t)=>{for(var r in t)if("signals"===r)n.signals=x(n.signals,t.signals);else{var e="legend"===r?{layout:1}:"style"===r||null;w(n,r,t[r],e)}return n},{})},n.one=g,n.pad=function(n,t,r,e){var u=r||" ",o=n+"",i=t-o.length;return i<=0?o:"left"===e?T(u,i)+o:"center"===e?T(u,~~(i/2))+o+T(u,Math.ceil(i/2)):o+T(u,i)},n.panLinear=function(n,t){return R(n,t,E,h)},n.panLog=function(n,t){var r=Math.sign(n[0]);return R(n,t,k(r),D(r))},n.panPow=function(n,t,r){return R(n,t,N(r),N(1/r))},n.panSymlog=function(n,t,r){return R(n,t,A(r),S(r))},n.peek=z,n.quarter=function(n){return 1+~~(new Date(n).getMonth()/3)},n.repeat=T,n.span=function(n){return n&&z(n)-n[0]||0},n.splitAccessPath=u,n.stringValue=f,n.toBoolean=function(n){return null==n||""===n?null:!(!n||"false"===n||"0"===n)&&!!n},n.toDate=function(n,t){return t=t||U,null==n||""===n?null:t(n)},n.toNumber=E,n.toSet=function(n){for(var t={},r=0,e=n.length;r<e;++r)t[n[r]]=!0;return t},n.toString=function(n){return null==n||""===n?null:n+""},n.truncate=function(n,t,r,e){var u=null!=e?e:"…",o=n+"",i=o.length,c=Math.max(0,t-u.length);return i<=t?o:"left"===r?u+o.slice(i-c):"center"===r?o.slice(0,Math.ceil(c/2))+u+o.slice(i-~~(c/2)):o.slice(0,c)+u},n.truthy=v,n.utcquarter=function(n){return 1+~~(new Date(n).getUTCMonth()/3)},n.visitArray=function(n,t,r){if(n){var e,u=0,o=n.length;if(t)for(;u<o;++u)(e=t(n[u]))&&r(e,u,n);else n.forEach(r)}},n.writeConfig=w,n.zero=p,n.zoomLinear=function(n,t,r){return F(n,t,r,E,h)},n.zoomLog=function(n,t,r){var e=Math.sign(n[0]);return F(n,t,r,k(e),D(e))},n.zoomPow=function(n,t,r,e){return F(n,t,r,N(e),N(1/e))},n.zoomSymlog=function(n,t,r,e){return F(n,t,r,A(e),S(e))},Object.defineProperty(n,"__esModule",{value:!0})}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).vega={})}(this,(function(n){"use strict";function t(n,t,r){return n.fields=t||[],n.fname=r,n}function r(n){return null==n?null:n.fields}function e(n){throw Error(n)}function u(n){var t,r,u,o=[],i=null,c=0,f=n.length,l="";function a(){o.push(l+n.substring(t,r)),l="",t=r+1}for(n+="",t=r=0;r<f;++r)if("\\"===(u=n[r]))l+=n.substring(t,r),t=++r;else if(u===i)a(),i=null,c=-1;else{if(i)continue;t===c&&'"'===u?(t=r+1,i=u):t===c&&"'"===u?(t=r+1,i=u):"."!==u||c?"["===u?(r>t&&a(),c=t=r+1):"]"===u&&(c||e("Access path missing open bracket: "+n),c>0&&a(),c=0,t=r+1):r>t?a():t=r+1}return c&&e("Access path missing closing bracket: "+n),i&&e("Access path missing closing quote: "+n),r>t&&(r++,a()),o}var o=Array.isArray;function i(n){return n===Object(n)}function c(n){return"string"==typeof n}function f(n){return o(n)?"["+n.map(f)+"]":i(n)||c(n)?JSON.stringify(n).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):n}function l(n,r){var e=u(n),o="return _["+e.map(f).join("][")+"];";return t(Function("_",o),[n=1===e.length?e[0]:n],r||n)}var a=[],s=l("id"),h=t((function(n){return n}),a,"identity"),p=t((function(){return 0}),a,"zero"),g=t((function(){return 1}),a,"one"),v=t((function(){return!0}),a,"true"),m=t((function(){return!1}),a,"false");function y(n,t,r){var e=[t].concat([].slice.call(r));console[n].apply(console,e)}var b=0,d=1,M=2,j=3,O=4;function w(n,t,r,e){var u,c;if(i(r)&&!o(r))for(u in c=i(n[t])?n[t]:n[t]={},r)e&&(!0===e||e[u])?w(c,u,r[u]):c[u]=r[u];else n[t]=r}function x(n,t){if(null==n)return t;const r={},e=[];function u(n){r[n.name]||(r[n.name]=1,e.push(n))}return t.forEach(u),n.forEach(u),e}function z(n){return n[n.length-1]}function E(n){return null==n||""===n?null:+n}function D(n){return function(t){return n*Math.exp(t)}}function k(n){return function(t){return Math.log(n*t)}}function A(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function S(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function N(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function R(n,t,r,e){var u=r(n[0]),o=r(z(n)),i=(o-u)*t;return[e(u-i),e(o-i)]}function F(n,t,r,e,u){var o=e(n[0]),i=e(z(n)),c=null!=t?e(t):(o+i)/2;return[u(c+(o-c)*r),u(c+(i-c)*r)]}function P(n){return null!=n?o(n)?n:[n]:[]}function _(n){return"function"==typeof n}const L=Object.prototype.hasOwnProperty;function q(n,t){return L.call(n,t)}var B={};function C(n){return"[object Date]"===Object.prototype.toString.call(n)}function I(n){return"number"==typeof n}function T(n,t){for(var r="";--t>=0;)r+=n;return r}function U(n){return I(n)?n:C(n)?n:Date.parse(n)}n.Debug=O,n.Error=d,n.Info=j,n.None=b,n.Warn=M,n.accessor=t,n.accessorFields=r,n.accessorName=function(n){return null==n?null:n.fname},n.array=P,n.clampRange=function(n,t,r){var e,u=n[0],o=n[1];return o<u&&(e=o,o=u,u=e),(e=o-u)>=r-t?[t,r]:[u=Math.min(Math.max(u,t),r-e),u+e]},n.compare=function(n,e){var o,i,c,l,a,s,h,p,g,v=[],m=(n=P(n)).map((function(n,t){return null==n?null:(v.push(t),_(n)?n:u(n).map(f).join("]["))})),y=v.length-1,b=P(e),d="var u,v;return ";if(y<0)return null;for(i=0;i<=y;++i)_(c=m[o=v[i]])?(l="(u=this."+(s="f"+o)+"(a))",a="(v=this."+s+"(b))",(h=h||{})[s]=c):(l="(u=a["+c+"])",a="(v=b["+c+"])"),s="((v=v instanceof Date?+v:v),(u=u instanceof Date?+u:u))","descending"!==b[o]?(g=1,p=-1):(g=-1,p=1),d+="("+l+"<"+a+"||u==null)&&v!=null?"+p+":(u>v||v==null)&&u!=null?"+g+":"+s+"!==u&&v===v?"+p+":v!==v&&u===u?"+g+(o<y?":":":0");return c=Function("a","b",d+";"),h&&(c=c.bind(h)),n=n.reduce((function(n,t){return _(t)?(r(t)||[]).forEach((function(t){n[t]=1})):null!=t&&(n[t+""]=1),n}),{}),t(c,Object.keys(n))},n.constant=function(n){return _(n)?n:function(){return n}},n.debounce=function(n,t){var r,e;function u(){t(e),r=e=null}return function(t){e=t,r&&clearTimeout(r),r=setTimeout(u,n)}},n.error=e,n.extend=function(n){for(var t,r,e=1,u=arguments.length;e<u;++e)for(r in t=arguments[e])n[r]=t[r];return n},n.extent=function(n,t){var r,e,u,o,i=0;if(n&&(r=n.length))if(null==t){for(e=n[i];i<r&&(null==e||e!=e);e=n[++i]);for(u=o=e;i<r;++i)null!=(e=n[i])&&(e<u&&(u=e),e>o&&(o=e))}else{for(e=t(n[i]);i<r&&(null==e||e!=e);e=t(n[++i]));for(u=o=e;i<r;++i)null!=(e=t(n[i]))&&(e<u&&(u=e),e>o&&(o=e))}return[u,o]},n.extentIndex=function(n,t){var r,e,u,o,i,c=-1,f=n.length;if(null==t){for(;++c<f;)if(null!=(e=n[c])&&e>=e){r=u=e;break}if(c===f)return[-1,-1];for(o=i=c;++c<f;)null!=(e=n[c])&&(r>e&&(r=e,o=c),u<e&&(u=e,i=c))}else{for(;++c<f;)if(null!=(e=t(n[c],c,n))&&e>=e){r=u=e;break}if(c===f)return[-1,-1];for(o=i=c;++c<f;)null!=(e=t(n[c],c,n))&&(r>e&&(r=e,o=c),u<e&&(u=e,i=c))}return[o,i]},n.falsy=m,n.fastmap=function(n){var t,r,e={};function u(n){return q(e,n)&&e[n]!==B}return t={size:0,empty:0,object:e,has:u,get:function(n){return u(n)?e[n]:void 0},set:function(n,r){return u(n)||(++t.size,e[n]===B&&--t.empty),e[n]=r,this},delete:function(n){return u(n)&&(--t.size,++t.empty,e[n]=B),this},clear:function(){t.size=t.empty=0,t.object=e={}},test:function(n){return arguments.length?(r=n,t):r},clean:function(){var n,u,o={},i=0;for(n in e)(u=e[n])===B||r&&r(u)||(o[n]=u,++i);t.size=i,t.empty=0,t.object=e=o}},n&&Object.keys(n).forEach((function(r){t.set(r,n[r])})),t},n.field=l,n.flush=function(n,t,r,e,u,o){if(!r&&0!==r)return o;var i,c,f=n[0],l=z(n),a=+r;return l<f&&(i=f,f=l,l=i),(i=Math.abs(t-f))<(c=Math.abs(l-t))&&i<=a?e:c<=a?u:o},n.hasOwnProperty=q,n.id=s,n.identity=h,n.inherits=function(n,t){var r=n.prototype=Object.create(t.prototype);return r.constructor=n,r},n.inrange=function(n,t,r,e){var u,o=t[0],i=t[t.length-1];return o>i&&(u=o,o=i,i=u),e=void 0===e||e,((r=void 0===r||r)?o<=n:o<n)&&(e?n<=i:n<i)},n.isArray=o,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=C,n.isFunction=_,n.isNumber=I,n.isObject=i,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=c,n.key=function(n,r){return n&&(n=r?P(n).map((function(n){return n.replace(/\\(.)/g,"$1")})):P(n)),t(n&&n.length?Function("_","return ''+"+n.map((function(n){return"_["+(r?f(n):u(n).map(f).join("]["))+"]"})).join("+'|'+")+";"):function(){return""},n,"key")},n.lerp=function(n,t){const r=n[0],e=z(n),u=+t;return u?1===u?e:r+u*(e-r):r},n.logger=function(n,t){var r=n||b;return{level:function(n){return arguments.length?(r=+n,this):r},error:function(){return r>=d&&y(t||"error","ERROR",arguments),this},warn:function(){return r>=M&&y(t||"warn","WARN",arguments),this},info:function(){return r>=j&&y(t||"log","INFO",arguments),this},debug:function(){return r>=O&&y(t||"log","DEBUG",arguments),this}}},n.merge=function(n,t,r,e){var u=t.length,o=r.length;if(!o)return t;if(!u)return r;for(var i=e||new t.constructor(u+o),c=0,f=0,l=0;c<u&&f<o;++l)i[l]=n(t[c],r[f])>0?r[f++]:t[c++];for(;c<u;++c,++l)i[l]=t[c];for(;f<o;++f,++l)i[l]=r[f];return i},n.mergeConfig=function(...n){return n.reduce((n,t)=>{for(var r in t)if("signals"===r)n.signals=x(n.signals,t.signals);else{var e="legend"===r?{layout:1}:"style"===r||null;w(n,r,t[r],e)}return n},{})},n.one=g,n.pad=function(n,t,r,e){var u=r||" ",o=n+"",i=t-o.length;return i<=0?o:"left"===e?T(u,i)+o:"center"===e?T(u,~~(i/2))+o+T(u,Math.ceil(i/2)):o+T(u,i)},n.panLinear=function(n,t){return R(n,t,E,h)},n.panLog=function(n,t){var r=Math.sign(n[0]);return R(n,t,k(r),D(r))},n.panPow=function(n,t,r){return R(n,t,N(r),N(1/r))},n.panSymlog=function(n,t,r){return R(n,t,A(r),S(r))},n.peek=z,n.quarter=function(n){return 1+~~(new Date(n).getMonth()/3)},n.repeat=T,n.span=function(n){return n&&z(n)-n[0]||0},n.splitAccessPath=u,n.stringValue=f,n.toBoolean=function(n){return null==n||""===n?null:!(!n||"false"===n||"0"===n)&&!!n},n.toDate=function(n,t){return t=t||U,null==n||""===n?null:t(n)},n.toNumber=E,n.toSet=function(n){for(var t={},r=0,e=n.length;r<e;++r)t[n[r]]=!0;return t},n.toString=function(n){return null==n||""===n?null:n+""},n.truncate=function(n,t,r,e){var u=null!=e?e:"…",o=n+"",i=o.length,c=Math.max(0,t-u.length);return i<=t?o:"left"===r?u+o.slice(i-c):"center"===r?o.slice(0,Math.ceil(c/2))+u+o.slice(i-~~(c/2)):o.slice(0,c)+u},n.truthy=v,n.utcquarter=function(n){return 1+~~(new Date(n).getUTCMonth()/3)},n.visitArray=function(n,t,r){if(n){var e,u=0,o=n.length;if(t)for(;u<o;++u)(e=t(n[u]))&&r(e,u,n);else n.forEach(r)}},n.writeConfig=w,n.zero=p,n.zoomLinear=function(n,t,r){return F(n,t,r,E,h)},n.zoomLog=function(n,t,r){var e=Math.sign(n[0]);return F(n,t,r,k(e),D(e))},n.zoomPow=function(n,t,r,e){return F(n,t,r,N(e),N(1/e))},n.zoomSymlog=function(n,t,r,e){return F(n,t,r,A(e),S(e))},Object.defineProperty(n,"__esModule",{value:!0})}));
{
"name": "vega-util",
"version": "1.12.0",
"version": "1.12.1",
"description": "JavaScript utilities for Vega.",

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

},
"gitHead": "b1337d09ced5f517d54c8ec17fdf849651f5c16c"
"gitHead": "b690910bacfcb2580511e262400e496d9b14b04f"
}

@@ -250,6 +250,6 @@ # vega-util

<a name="mergeConfig" href="#mergeConfig">#</a>
vega.<b>mergeConfig</b>(<i>configArray</i>)
vega.<b>mergeConfig</b>(<i>...config</i>)
[<>](https://github.com/vega/vega/blob/master/packages/vega-util/src/mergeConfig.js "Source")
Merges a collection of Vega configuration objects into a single combined object. Configuration objects with higher index positions in the array have higher precedence, and so may override settings provided by earlier objects.
Merges a collection of Vega configuration objects into a single combined object. Configuration objects with higher index positions in the arguments list have higher precedence, and so may override settings provided by earlier objects.

@@ -341,2 +341,8 @@ <a name="writeConfig" href="#writeConfig">#</a>

<a name="panSymlog" href="#panSymlog">#</a>
vega.<b>panSymlog</b>(<i>domain</i>, <i>delta</i>, <i>constant</i>)
[<>](https://github.com/vega/vega/blob/master/packages/vega-util/src/transform.js "Source")
Given an input numeric _domain_ (sorted in increasing order), returns a new domain array that translates the domain by a _delta_ using a symlog (symmetric log) scale transform parameterized by the provided _constant_. The _delta_ value is expressed as a fraction of the current domain span, and may be positive or negative to indicate the translation direction. The return value is a two-element array indicating the starting and ending value of the translated (panned) domain.
<a name="peek" href="#peek">#</a>

@@ -395,2 +401,8 @@ vega.<b>peek</b>(<i>array</i>)

<a name="zoomSymlog" href="#zoomSymlog">#</a>
vega.<b>zoomSymlog</b>(<i>domain</i>, <i>anchor</i>, <i>scale</i>, <i>constant</i>)
[<>](https://github.com/vega/vega/blob/master/packages/vega-util/src/transform.js "Source")
Given an input numeric _domain_ (sorted in increasing order), returns a new domain array that scales (zooms) the domain by a _scale_ factor using a symlog (symmetric log) scale transform parameterized by the provided _constant_, centered on the given _anchor_ value. If _anchor_ is `null`, the midpoint of the domain is used instead. The return value is a two-element array indicating the starting and ending value of the scaled (zoomed) domain.
### Dates

@@ -397,0 +409,0 @@

@@ -11,3 +11,3 @@ /**

// find first valid value
for (v = array[i]; v == null || v !== v; v = array[++i]);
for (v = array[i]; i < n && (v == null || v !== v); v = array[++i]);
min = max = v;

@@ -26,3 +26,3 @@

// find first valid value
for (v = f(array[i]); v == null || v !== v; v = f(array[++i]));
for (v = f(array[i]); i < n && (v == null || v !== v); v = f(array[++i]));
min = max = v;

@@ -29,0 +29,0 @@

@@ -14,2 +14,3 @@ export default function(array, f) {

}
if (i === n) return [-1, -1];
u = v = i;

@@ -37,2 +38,3 @@ while (++i < n) {

}
if (i === n) return [-1, -1];
u = v = i;

@@ -39,0 +41,0 @@ while (++i < n) {

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