Comparing version 1.14.0 to 1.14.1
@@ -559,6 +559,6 @@ (function (global, factory) { | ||
has: has$1, | ||
get: function(key) { | ||
get(key) { | ||
return has$1(key) ? obj[key] : undefined; | ||
}, | ||
set: function(key, value) { | ||
set(key, value) { | ||
if (!has$1(key)) { | ||
@@ -571,3 +571,3 @@ ++map.size; | ||
}, | ||
delete: function(key) { | ||
delete(key) { | ||
if (has$1(key)) { | ||
@@ -580,7 +580,7 @@ --map.size; | ||
}, | ||
clear: function() { | ||
clear() { | ||
map.size = map.empty = 0; | ||
map.object = obj = {}; | ||
}, | ||
test: function(_) { | ||
test(_) { | ||
if (arguments.length) { | ||
@@ -593,3 +593,3 @@ test = _; | ||
}, | ||
clean: function() { | ||
clean() { | ||
var next = {}, | ||
@@ -854,4 +854,4 @@ size = 0, | ||
if (array) { | ||
var i = 0, n = array.length, t; | ||
if (filter) { | ||
var i = 0, n = array.length, t; | ||
for (; i<n; ++i) { | ||
@@ -858,0 +858,0 @@ if (t = filter(array[i])) visitor(t, i, array); |
@@ -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){return 1===n.length?u(n[0]):o(n)}const u=n=>function(t){return t[n]},o=n=>{const t=n.length;return function(r){for(let e=0;e<t;++e)r=r[n[e]];return r}};function i(n){throw Error(n)}function c(n){var t,r,e,u=[],o=null,c=0,f=n.length,l="";function a(){u.push(l+n.substring(t,r)),l="",t=r+1}for(n+="",t=r=0;r<f;++r)if("\\"===(e=n[r]))l+=n.substring(t,r),l+=n.substring(++r,++r),t=r;else if(e===o)a(),o=null,c=-1;else{if(o)continue;t===c&&'"'===e||t===c&&"'"===e?(t=r+1,o=e):"."!==e||c?"["===e?(r>t&&a(),c=t=r+1):"]"===e&&(c||i("Access path missing open bracket: "+n),c>0&&a(),c=0,t=r+1):r>t?a():t=r+1}return c&&i("Access path missing closing bracket: "+n),o&&i("Access path missing closing quote: "+n),r>t&&(r++,a()),u}function f(n,r,u){const o=c(n);return n=1===o.length?o[0]:n,t((u&&u.get||e)(o),[n],r||n)}var l=[],a=f("id"),s=t((function(n){return n}),l,"identity"),g=t((function(){return 0}),l,"zero"),h=t((function(){return 1}),l,"one"),p=t((function(){return!0}),l,"true"),m=t((function(){return!1}),l,"false");function y(n,t,r){var e=[t].concat([].slice.call(r));console[n].apply(console,e)}var v=Array.isArray;function b(n){return n===Object(n)}const d=n=>"__proto__"!==n;function M(n,t,r,e){var u,o;if(d(t))if(b(r)&&!v(r))for(u in o=b(n[t])?n[t]:n[t]={},r)e&&(!0===e||e[u])?M(o,u,r[u]):d(u)&&(o[u]=r[u]);else n[t]=r}function j(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 O(n){return n[n.length-1]}function w(n){return null==n||""===n?null:+n}function x(n){return function(t){return n*Math.exp(t)}}function E(n){return function(t){return Math.log(n*t)}}function z(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function D(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function k(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function A(n,t,r,e){var u=r(n[0]),o=r(O(n)),i=(o-u)*t;return[e(u-i),e(o-i)]}function S(n,t,r,e,u){var o=e(n[0]),i=e(O(n)),c=null!=t?e(t):(o+i)/2;return[u(c+(o-c)*r),u(c+(i-c)*r)]}function N(n){return null!=n?v(n)?n:[n]:[]}function R(n){return"function"==typeof n}const P=(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),_=(n,t)=>1===n.length?C(n[0],t[0]):L(n,t,n.length),C=(n,t)=>function(r,e){return P(n(r),n(e))*t},L=(n,t,r)=>(t.push(0),function(e,u){let o,i=0,c=-1;for(;0===i&&++c<r;)o=n[c],i=P(o(e),o(u));return i*t[c]});const q=Object.prototype.hasOwnProperty;function B(n,t){return q.call(n,t)}var F={};function I(n){return"[object Date]"===Object.prototype.toString.call(n)}function T(n){return"number"==typeof n}function U(n){return"string"==typeof n}function W(n,t){for(var r="";--t>=0;)r+=n;return r}function G(n){return T(n)||I(n)?n:Date.parse(n)}n.Debug=4,n.Error=1,n.Info=3,n.None=0,n.Warn=2,n.accessor=t,n.accessorFields=r,n.accessorName=function(n){return null==n?null:n.fname},n.array=N,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,u){u=u||{},e=N(e)||[];const o=[],i=[],c={},l=u.comparator||_;return N(n).forEach((n,t)=>{null!=n&&(o.push("descending"===e[t]?-1:1),i.push(n=R(n)?n:f(n,null,u)),(r(n)||[]).forEach(n=>c[n]=1))}),0===i.length?null:t(l(i,o),Object.keys(c))},n.constant=function(n){return R(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=i,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 B(e,n)&&e[n]!==F}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]===F&&--t.empty),e[n]=r,this},delete:function(n){return u(n)&&(--t.size,++t.empty,e[n]=F),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])===F||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=f,n.flush=function(n,t,r,e,u,o){if(!r&&0!==r)return o;var i,c,f=n[0],l=O(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=B,n.id=a,n.identity=s,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=v,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=I,n.isFunction=R,n.isNumber=T,n.isObject=b,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=U,n.key=function(n,r,u){n&&(n=r?N(n).map(n=>n.replace(/\\(.)/g,"$1")):N(n));const o=n&&n.length,i=u&&u.get||e,f=n=>i(r?[n]:c(n));let l;if(o)if(1===o){const t=f(n[0]);l=function(n){return""+t(n)}}else{const t=n.map(f);l=function(n){let r=""+t[0](n),e=0;for(;++e<o;)r+="|"+t[e](n);return r}}else l=function(){return""};return t(l,n,"key")},n.lerp=function(n,t){const r=n[0],e=O(n),u=+t;return u?1===u?e:r+u*(e-r):r},n.logger=function(n,t){var r=n||0;return{level:function(n){return arguments.length?(r=+n,this):r},error:function(){return r>=1&&y(t||"error","ERROR",arguments),this},warn:function(){return r>=2&&y(t||"warn","WARN",arguments),this},info:function(){return r>=3&&y(t||"log","INFO",arguments),this},debug:function(){return r>=4&&y(t||"log","DEBUG",arguments),this}}},n.lruCache=function(n){let t,r,e;n=+n||1e4;const u=()=>{t={},r={},e=0},o=(u,o)=>(++e>n&&(r=t,t={},e=1),t[u]=o);return u(),{clear:u,has:n=>B(t,n)||B(r,n),get:n=>B(t,n)?t[n]:B(r,n)?o(n,r[n]):void 0,set:(n,r)=>B(t,n)?t[n]=r:o(n,r)}},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=j(n.signals,t.signals);else{var e="legend"===r?{layout:1}:"style"===r||null;M(n,r,t[r],e)}return n},{})},n.one=h,n.pad=function(n,t,r,e){var u=r||" ",o=n+"",i=t-o.length;return i<=0?o:"left"===e?W(u,i)+o:"center"===e?W(u,~~(i/2))+o+W(u,Math.ceil(i/2)):o+W(u,i)},n.panLinear=function(n,t){return A(n,t,w,s)},n.panLog=function(n,t){var r=Math.sign(n[0]);return A(n,t,E(r),x(r))},n.panPow=function(n,t,r){return A(n,t,k(r),k(1/r))},n.panSymlog=function(n,t,r){return A(n,t,z(r),D(r))},n.peek=O,n.quarter=function(n){return 1+~~(new Date(n).getMonth()/3)},n.repeat=W,n.span=function(n){return n&&O(n)-n[0]||0},n.splitAccessPath=c,n.stringValue=function n(t){return v(t)?"["+t.map(n)+"]":b(t)||U(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||G,null==n||""===n?null:t(n)},n.toNumber=w,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=p,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=M,n.zero=g,n.zoomLinear=function(n,t,r){return S(n,t,r,w,s)},n.zoomLog=function(n,t,r){var e=Math.sign(n[0]);return S(n,t,r,E(e),x(e))},n.zoomPow=function(n,t,r,e){return S(n,t,r,k(e),k(1/e))},n.zoomSymlog=function(n,t,r,e){return S(n,t,r,z(e),D(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){return 1===n.length?u(n[0]):o(n)}const u=n=>function(t){return t[n]},o=n=>{const t=n.length;return function(r){for(let e=0;e<t;++e)r=r[n[e]];return r}};function i(n){throw Error(n)}function c(n){var t,r,e,u=[],o=null,c=0,f=n.length,l="";function a(){u.push(l+n.substring(t,r)),l="",t=r+1}for(n+="",t=r=0;r<f;++r)if("\\"===(e=n[r]))l+=n.substring(t,r),l+=n.substring(++r,++r),t=r;else if(e===o)a(),o=null,c=-1;else{if(o)continue;t===c&&'"'===e||t===c&&"'"===e?(t=r+1,o=e):"."!==e||c?"["===e?(r>t&&a(),c=t=r+1):"]"===e&&(c||i("Access path missing open bracket: "+n),c>0&&a(),c=0,t=r+1):r>t?a():t=r+1}return c&&i("Access path missing closing bracket: "+n),o&&i("Access path missing closing quote: "+n),r>t&&(r++,a()),u}function f(n,r,u){const o=c(n);return n=1===o.length?o[0]:n,t((u&&u.get||e)(o),[n],r||n)}var l=[],a=f("id"),s=t((function(n){return n}),l,"identity"),g=t((function(){return 0}),l,"zero"),h=t((function(){return 1}),l,"one"),p=t((function(){return!0}),l,"true"),m=t((function(){return!1}),l,"false");function y(n,t,r){var e=[t].concat([].slice.call(r));console[n].apply(console,e)}var v=Array.isArray;function b(n){return n===Object(n)}const d=n=>"__proto__"!==n;function M(n,t,r,e){var u,o;if(d(t))if(b(r)&&!v(r))for(u in o=b(n[t])?n[t]:n[t]={},r)e&&(!0===e||e[u])?M(o,u,r[u]):d(u)&&(o[u]=r[u]);else n[t]=r}function j(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 O(n){return n[n.length-1]}function w(n){return null==n||""===n?null:+n}function x(n){return function(t){return n*Math.exp(t)}}function E(n){return function(t){return Math.log(n*t)}}function z(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function D(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function k(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function A(n,t,r,e){var u=r(n[0]),o=r(O(n)),i=(o-u)*t;return[e(u-i),e(o-i)]}function S(n,t,r,e,u){var o=e(n[0]),i=e(O(n)),c=null!=t?e(t):(o+i)/2;return[u(c+(o-c)*r),u(c+(i-c)*r)]}function N(n){return null!=n?v(n)?n:[n]:[]}function R(n){return"function"==typeof n}const P=(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),_=(n,t)=>1===n.length?C(n[0],t[0]):L(n,t,n.length),C=(n,t)=>function(r,e){return P(n(r),n(e))*t},L=(n,t,r)=>(t.push(0),function(e,u){let o,i=0,c=-1;for(;0===i&&++c<r;)o=n[c],i=P(o(e),o(u));return i*t[c]});const q=Object.prototype.hasOwnProperty;function B(n,t){return q.call(n,t)}var F={};function I(n){return"[object Date]"===Object.prototype.toString.call(n)}function T(n){return"number"==typeof n}function U(n){return"string"==typeof n}function W(n,t){for(var r="";--t>=0;)r+=n;return r}function G(n){return T(n)||I(n)?n:Date.parse(n)}n.Debug=4,n.Error=1,n.Info=3,n.None=0,n.Warn=2,n.accessor=t,n.accessorFields=r,n.accessorName=function(n){return null==n?null:n.fname},n.array=N,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,u){u=u||{},e=N(e)||[];const o=[],i=[],c={},l=u.comparator||_;return N(n).forEach((n,t)=>{null!=n&&(o.push("descending"===e[t]?-1:1),i.push(n=R(n)?n:f(n,null,u)),(r(n)||[]).forEach(n=>c[n]=1))}),0===i.length?null:t(l(i,o),Object.keys(c))},n.constant=function(n){return R(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=i,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 B(e,n)&&e[n]!==F}return t={size:0,empty:0,object:e,has:u,get:n=>u(n)?e[n]:void 0,set(n,r){return u(n)||(++t.size,e[n]===F&&--t.empty),e[n]=r,this},delete(n){return u(n)&&(--t.size,++t.empty,e[n]=F),this},clear(){t.size=t.empty=0,t.object=e={}},test(n){return arguments.length?(r=n,t):r},clean(){var n,u,o={},i=0;for(n in e)(u=e[n])===F||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=f,n.flush=function(n,t,r,e,u,o){if(!r&&0!==r)return o;var i,c,f=n[0],l=O(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=B,n.id=a,n.identity=s,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=v,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=I,n.isFunction=R,n.isNumber=T,n.isObject=b,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=U,n.key=function(n,r,u){n&&(n=r?N(n).map(n=>n.replace(/\\(.)/g,"$1")):N(n));const o=n&&n.length,i=u&&u.get||e,f=n=>i(r?[n]:c(n));let l;if(o)if(1===o){const t=f(n[0]);l=function(n){return""+t(n)}}else{const t=n.map(f);l=function(n){let r=""+t[0](n),e=0;for(;++e<o;)r+="|"+t[e](n);return r}}else l=function(){return""};return t(l,n,"key")},n.lerp=function(n,t){const r=n[0],e=O(n),u=+t;return u?1===u?e:r+u*(e-r):r},n.logger=function(n,t){var r=n||0;return{level:function(n){return arguments.length?(r=+n,this):r},error:function(){return r>=1&&y(t||"error","ERROR",arguments),this},warn:function(){return r>=2&&y(t||"warn","WARN",arguments),this},info:function(){return r>=3&&y(t||"log","INFO",arguments),this},debug:function(){return r>=4&&y(t||"log","DEBUG",arguments),this}}},n.lruCache=function(n){let t,r,e;n=+n||1e4;const u=()=>{t={},r={},e=0},o=(u,o)=>(++e>n&&(r=t,t={},e=1),t[u]=o);return u(),{clear:u,has:n=>B(t,n)||B(r,n),get:n=>B(t,n)?t[n]:B(r,n)?o(n,r[n]):void 0,set:(n,r)=>B(t,n)?t[n]=r:o(n,r)}},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=j(n.signals,t.signals);else{var e="legend"===r?{layout:1}:"style"===r||null;M(n,r,t[r],e)}return n},{})},n.one=h,n.pad=function(n,t,r,e){var u=r||" ",o=n+"",i=t-o.length;return i<=0?o:"left"===e?W(u,i)+o:"center"===e?W(u,~~(i/2))+o+W(u,Math.ceil(i/2)):o+W(u,i)},n.panLinear=function(n,t){return A(n,t,w,s)},n.panLog=function(n,t){var r=Math.sign(n[0]);return A(n,t,E(r),x(r))},n.panPow=function(n,t,r){return A(n,t,k(r),k(1/r))},n.panSymlog=function(n,t,r){return A(n,t,z(r),D(r))},n.peek=O,n.quarter=function(n){return 1+~~(new Date(n).getMonth()/3)},n.repeat=W,n.span=function(n){return n&&O(n)-n[0]||0},n.splitAccessPath=c,n.stringValue=function n(t){return v(t)?"["+t.map(n)+"]":b(t)||U(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||G,null==n||""===n?null:t(n)},n.toNumber=w,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=p,n.utcquarter=function(n){return 1+~~(new Date(n).getUTCMonth()/3)},n.visitArray=function(n,t,r){if(n)if(t)for(var e,u=0,o=n.length;u<o;++u)(e=t(n[u]))&&r(e,u,n);else n.forEach(r)},n.writeConfig=M,n.zero=g,n.zoomLinear=function(n,t,r){return S(n,t,r,w,s)},n.zoomLog=function(n,t,r){var e=Math.sign(n[0]);return S(n,t,r,E(e),x(e))},n.zoomPow=function(n,t,r,e){return S(n,t,r,k(e),k(1/e))},n.zoomSymlog=function(n,t,r,e){return S(n,t,r,z(e),D(e))},Object.defineProperty(n,"__esModule",{value:!0})})); |
@@ -146,10 +146,12 @@ // Functions | ||
export interface LoggerInterface { | ||
level: (_: number) => number | LoggerInterface; | ||
error(...args: readonly any[]): LoggerInterface; | ||
warn(...args: readonly any[]): LoggerInterface; | ||
info(...args: readonly any[]): LoggerInterface; | ||
debug(...args: readonly any[]): LoggerInterface; | ||
level(_: number): this; | ||
level(): number; | ||
error(...args: readonly any[]): this; | ||
warn(...args: readonly any[]): this; | ||
info(...args: readonly any[]): this; | ||
debug(...args: readonly any[]): this; | ||
} | ||
export const None: number; | ||
export const Error: number; | ||
export const Warn: number; | ||
@@ -156,0 +158,0 @@ export const Info: number; |
{ | ||
"name": "vega-util", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "JavaScript utilities for Vega.", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "48c85218f2202242171aa569f2dca0f53cf2b51f" | ||
"gitHead": "62565bbe084a422c4a0cbc6e19c6f7c45a3e5137" | ||
} |
@@ -19,6 +19,6 @@ import hasOwnProperty from './hasOwnProperty'; | ||
has: has, | ||
get: function(key) { | ||
get(key) { | ||
return has(key) ? obj[key] : undefined; | ||
}, | ||
set: function(key, value) { | ||
set(key, value) { | ||
if (!has(key)) { | ||
@@ -31,3 +31,3 @@ ++map.size; | ||
}, | ||
delete: function(key) { | ||
delete(key) { | ||
if (has(key)) { | ||
@@ -40,7 +40,7 @@ --map.size; | ||
}, | ||
clear: function() { | ||
clear() { | ||
map.size = map.empty = 0; | ||
map.object = obj = {}; | ||
}, | ||
test: function(_) { | ||
test(_) { | ||
if (arguments.length) { | ||
@@ -53,3 +53,3 @@ test = _; | ||
}, | ||
clean: function() { | ||
clean() { | ||
var next = {}, | ||
@@ -56,0 +56,0 @@ size = 0, |
export default function(array, filter, visitor) { | ||
if (array) { | ||
var i = 0, n = array.length, t; | ||
if (filter) { | ||
var i = 0, n = array.length, t; | ||
for (; i<n; ++i) { | ||
@@ -6,0 +6,0 @@ if (t = filter(array[i])) visitor(t, i, array); |
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
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
1748
96870