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.17.1 to 1.17.2

3

build/vega-util.js

@@ -57,4 +57,3 @@ (function (global, factory) {

if (c === '\\') {
s += p.substring(i, j);
s += p.substring(++j, ++j);
s += p.substring(i, j++);
i = j;

@@ -61,0 +60,0 @@ } else if (c === q) {

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

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

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

if (c === '\\') {
s += p.substring(i, j);
s += p.substring(++j, ++j);
s += p.substring(i, j++);
i = j;

@@ -55,0 +54,0 @@ } else if (c === q) {

{
"name": "vega-util",
"version": "1.17.1",
"version": "1.17.2",
"description": "JavaScript utilities for Vega.",

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

},
"gitHead": "fb1092f6b931d450f9c210b67ae4752bd3dd461b"
"gitHead": "a7a312ebe9db675ae03bd354f193ed34a976d21f"
}

@@ -23,4 +23,3 @@ import error from './error';

if (c === '\\') {
s += p.substring(i, j);
s += p.substring(++j, ++j);
s += p.substring(i, j++);
i = j;

@@ -27,0 +26,0 @@ } else if (c === q) {

Sorry, the diff of this file is not supported yet

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