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.15.3 to 1.16.0

src/isIterable.js

5

build/vega-util.js

@@ -647,2 +647,6 @@ (function (global, factory) {

function isIterable (_) {
return _ && isFunction(_[Symbol.iterator]);
}
function isNumber (_) {

@@ -868,2 +872,3 @@ return typeof _ === 'number';

exports.isFunction = isFunction;
exports.isIterable = isIterable;
exports.isNumber = isNumber;

@@ -870,0 +875,0 @@ exports.isObject = isObject;

2

build/vega-util.min.js

@@ -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)}var m=Array.isArray;function b(n){return n===Object(n)}const d=n=>"__proto__"!==n;function M(n,t,e,r){if(!d(t))return;let o,u;if(b(e)&&!m(e))for(o in u=b(n[t])?n[t]:n[t]={},e)r&&(!0===r||r[o])?M(u,o,e[o]):d(o)&&(u[o]=e[o]);else n[t]=e}function j(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 O(n){return n[n.length-1]}function w(n){return null==n||""===n?null:+n}const x=n=>t=>n*Math.exp(t),E=n=>t=>Math.log(n*t),z=n=>t=>Math.sign(t)*Math.log1p(Math.abs(t/n)),v=n=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*n,D=n=>t=>t<0?-Math.pow(-t,n):Math.pow(t,n);function k(n,t,e,r){const o=e(n[0]),u=e(O(n)),i=(u-o)*t;return[r(o-i),r(u-i)]}function A(n,t,e,r,o){const u=r(n[0]),i=r(O(n)),c=null!=t?r(t):(u+i)/2;return[o(c+(u-c)*e),o(c+(i-c)*e)]}function S(n){return null!=n?m(n)?n:[n]:[]}function N(n){return"function"==typeof n}const R=(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),P=(n,t)=>1===n.length?_(n[0],t[0]):T(n,t,n.length),_=(n,t)=>function(e,r){return R(n(e),n(r))*t},T=(n,t,e)=>(t.push(0),function(r,o){let u,i=0,c=-1;for(;0===i&&++c<e;)u=n[c],i=R(u(r),u(o));return i*t[c]});function C(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 L=Object.prototype.hasOwnProperty;function q(n,t){return L.call(n,t)}const B={};function F(n){return"[object Date]"===Object.prototype.toString.call(n)}function I(n){return"number"==typeof n}function U(n){return"string"==typeof n}function W(n,t){let e="";for(;--t>=0;)e+=n;return e}const G=n=>I(n)||F(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=e,n.accessorName=function(n){return null==n?null:n.fname},n.array=S,n.ascending=R,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=S(r)||[];const u=[],i=[],c={},s=o.comparator||P;return S(n).forEach((n,t)=>{null!=n&&(u.push("descending"===r[t]?-1:1),i.push(n=N(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 N(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=C,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 q(e,n)&&e[n]!==B}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]===B&&--o.empty),e[n]=t,this},delete(n){return r(n)&&(--o.size,++o.empty,e[n]=B),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===B||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=O(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=q,n.id=s,n.identity=f,n.inherits=function(n,t,e){const r=n.prototype=Object.create(t.prototype);return r.constructor=n,C(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=m,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=F,n.isFunction=N,n.isNumber=I,n.isObject=b,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=U,n.key=function(n,e,o){n&&(n=e?S(n).map(n=>n.replace(/\\(.)/g,"$1")):S(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=O(n),o=+t;return o?1===o?r:e+o*(r-e):e},n.logger=function(n,t){let e=n||0;return{level(n){return arguments.length?(e=+n,this):e},error(){return e>=1&&y(t||"error","ERROR",arguments),this},warn(){return e>=2&&y(t||"warn","WARN",arguments),this},info(){return e>=3&&y(t||"log","INFO",arguments),this},debug(){return e>=4&&y(t||"log","DEBUG",arguments),this}}},n.lruCache=function(n){let t,e,r;n=+n||1e4;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=>q(t,n)||q(e,n),get:n=>q(t,n)?t[n]:q(e,n)?u(n,e[n]):void 0,set:(n,e)=>q(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(...n){return n.reduce((n,t)=>{for(const e in t)if("signals"===e)n.signals=j(n.signals,t.signals);else{const r="legend"===e?{layout:1}:"style"===e||null;M(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?W(o,i)+u:"center"===r?W(o,~~(i/2))+u+W(o,Math.ceil(i/2)):u+W(o,i)},n.panLinear=function(n,t){return k(n,t,w,f)},n.panLog=function(n,t){var e=Math.sign(n[0]);return k(n,t,E(e),x(e))},n.panPow=function(n,t,e){return k(n,t,D(e),D(1/e))},n.panSymlog=function(n,t,e){return k(n,t,z(e),v(e))},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 m(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){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=M,n.zero=a,n.zoomLinear=function(n,t,e){return A(n,t,e,w,f)},n.zoomLog=function(n,t,e){const r=Math.sign(n[0]);return A(n,t,e,E(r),x(r))},n.zoomPow=function(n,t,e,r){return A(n,t,e,D(r),D(1/r))},n.zoomSymlog=function(n,t,e,r){return A(n,t,e,z(r),v(r))},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="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)}var m=Array.isArray;function b(n){return n===Object(n)}const d=n=>"__proto__"!==n;function M(n,t,e,r){if(!d(t))return;let o,u;if(b(e)&&!m(e))for(o in u=b(n[t])?n[t]:n[t]={},e)r&&(!0===r||r[o])?M(u,o,e[o]):d(o)&&(u[o]=e[o]);else n[t]=e}function j(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 O(n){return n[n.length-1]}function w(n){return null==n||""===n?null:+n}const x=n=>t=>n*Math.exp(t),E=n=>t=>Math.log(n*t),z=n=>t=>Math.sign(t)*Math.log1p(Math.abs(t/n)),v=n=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*n,D=n=>t=>t<0?-Math.pow(-t,n):Math.pow(t,n);function k(n,t,e,r){const o=e(n[0]),u=e(O(n)),i=(u-o)*t;return[r(o-i),r(u-i)]}function A(n,t,e,r,o){const u=r(n[0]),i=r(O(n)),c=null!=t?r(t):(u+i)/2;return[o(c+(u-c)*e),o(c+(i-c)*e)]}function S(n){return null!=n?m(n)?n:[n]:[]}function N(n){return"function"==typeof n}const R=(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),P=(n,t)=>1===n.length?_(n[0],t[0]):T(n,t,n.length),_=(n,t)=>function(e,r){return R(n(e),n(r))*t},T=(n,t,e)=>(t.push(0),function(r,o){let u,i=0,c=-1;for(;0===i&&++c<e;)u=n[c],i=R(u(r),u(o));return i*t[c]});function C(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 I=Object.prototype.hasOwnProperty;function L(n,t){return I.call(n,t)}const q={};function B(n){return"[object Date]"===Object.prototype.toString.call(n)}function F(n){return"number"==typeof n}function U(n){return"string"==typeof n}function W(n,t){let e="";for(;--t>=0;)e+=n;return e}const G=n=>F(n)||B(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=e,n.accessorName=function(n){return null==n?null:n.fname},n.array=S,n.ascending=R,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=S(r)||[];const u=[],i=[],c={},s=o.comparator||P;return S(n).forEach(((n,t)=>{null!=n&&(u.push("descending"===r[t]?-1:1),i.push(n=N(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 N(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=C,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 L(e,n)&&e[n]!==q}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]===q&&--o.empty),e[n]=t,this},delete(n){return r(n)&&(--o.size,++o.empty,e[n]=q),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===q||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=O(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=L,n.id=s,n.identity=f,n.inherits=function(n,t,e){const r=n.prototype=Object.create(t.prototype);return r.constructor=n,C(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=m,n.isBoolean=function(n){return"boolean"==typeof n},n.isDate=B,n.isFunction=N,n.isIterable=function(n){return n&&N(n[Symbol.iterator])},n.isNumber=F,n.isObject=b,n.isRegExp=function(n){return"[object RegExp]"===Object.prototype.toString.call(n)},n.isString=U,n.key=function(n,e,o){n&&(n=e?S(n).map((n=>n.replace(/\\(.)/g,"$1"))):S(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=O(n),o=+t;return o?1===o?r:e+o*(r-e):e},n.logger=function(n,t){let e=n||0;return{level(n){return arguments.length?(e=+n,this):e},error(){return e>=1&&y(t||"error","ERROR",arguments),this},warn(){return e>=2&&y(t||"warn","WARN",arguments),this},info(){return e>=3&&y(t||"log","INFO",arguments),this},debug(){return e>=4&&y(t||"log","DEBUG",arguments),this}}},n.lruCache=function(n){let t,e,r;n=+n||1e4;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=>L(t,n)||L(e,n),get:n=>L(t,n)?t[n]:L(e,n)?u(n,e[n]):void 0,set:(n,e)=>L(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(...n){return n.reduce(((n,t)=>{for(const e in t)if("signals"===e)n.signals=j(n.signals,t.signals);else{const r="legend"===e?{layout:1}:"style"===e||null;M(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?W(o,i)+u:"center"===r?W(o,~~(i/2))+u+W(o,Math.ceil(i/2)):u+W(o,i)},n.panLinear=function(n,t){return k(n,t,w,f)},n.panLog=function(n,t){var e=Math.sign(n[0]);return k(n,t,E(e),x(e))},n.panPow=function(n,t,e){return k(n,t,D(e),D(1/e))},n.panSymlog=function(n,t,e){return k(n,t,z(e),v(e))},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 m(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){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=M,n.zero=a,n.zoomLinear=function(n,t,e){return A(n,t,e,w,f)},n.zoomLog=function(n,t,e){const r=Math.sign(n[0]);return A(n,t,e,E(r),x(r))},n.zoomPow=function(n,t,e,r){return A(n,t,e,D(r),D(1/r))},n.zoomSymlog=function(n,t,e,r){return A(n,t,e,z(r),v(r))},Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=vega-util.min.js.map

@@ -641,2 +641,6 @@ function accessor (fn, fields, name) {

function isIterable (_) {
return _ && isFunction(_[Symbol.iterator]);
}
function isNumber (_) {

@@ -831,2 +835,2 @@ return typeof _ === 'number';

export { Debug, Error$1 as Error, Info, None, Warn, accessor, accessorFields, accessorName, array, ascending, clampRange, compare, constant, debounce, error, extend, extent, extentIndex, falsy, fastmap, field, flush, has as hasOwnProperty, id, identity, inherits, inrange, isArray, isBoolean, isDate, isFunction, isNumber, isObject, isRegExp, isString, key, lerp, logger, lruCache, merge, mergeConfig, one, pad, panLinear, panLog, panPow, panSymlog, peek, quarter, repeat, span, splitAccessPath, $ as stringValue, toBoolean, toDate, toNumber, toSet, toString, truncate, truthy, utcquarter, visitArray, writeConfig, zero, zoomLinear, zoomLog, zoomPow, zoomSymlog };
export { Debug, Error$1 as Error, Info, None, Warn, accessor, accessorFields, accessorName, array, ascending, clampRange, compare, constant, debounce, error, extend, extent, extentIndex, falsy, fastmap, field, flush, has as hasOwnProperty, id, identity, inherits, inrange, isArray, isBoolean, isDate, isFunction, isIterable, isNumber, isObject, isRegExp, isString, key, lerp, logger, lruCache, merge, mergeConfig, one, pad, panLinear, panLog, panPow, panSymlog, peek, quarter, repeat, span, splitAccessPath, $ as stringValue, toBoolean, toDate, toNumber, toSet, toString, truncate, truthy, utcquarter, visitArray, writeConfig, zero, zoomLinear, zoomLog, zoomPow, zoomSymlog };

@@ -39,2 +39,3 @@ // Functions

export function isFunction(a: any): a is Function;
export function isIterable(a: any): boolean;
export function isNumber(a: any): a is number;

@@ -41,0 +42,0 @@ export function isObject(a: any): a is object;

@@ -65,2 +65,3 @@ export {

export {default as isFunction} from './src/isFunction';
export {default as isIterable} from './src/isIterable';
export {default as isNumber} from './src/isNumber';

@@ -67,0 +68,0 @@ export {default as isObject} from './src/isObject';

{
"name": "vega-util",
"version": "1.15.3",
"version": "1.16.0",
"description": "JavaScript utilities for Vega.",

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

},
"gitHead": "d098e08724450b1e40d66e16e2d0d5e991929822"
"gitHead": "c58de105bb4cd33ed74d2b6a02d551f5c11d72c7"
}

@@ -160,2 +160,8 @@ # vega-util

<a name="isIterable" href="#isIterable">#</a>
vega.<b>isIterable</b>(<i>value</i>)
[<>](https://github.com/vega/vega/blob/master/packages/vega-util/src/isIterable.js "Source")
Returns `true` if the input *value* supports the [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) protocol, `false` otherwise.
<a name="isNumber" href="#isNumber">#</a>

@@ -162,0 +168,0 @@ vega.<b>isNumber</b>(<i>value</i>)

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