@vertexvis/utils 0.10.2-canary.7 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.cjs.js +24 -24
- package/dist/browser.cjs.js.map +1 -1
- package/dist/browser.esm.js +24 -24
- package/dist/browser.esm.js.map +1 -1
- package/dist/bundle.cjs.js +30 -28
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +24 -24
- package/dist/bundle.esm.js.map +1 -1
- package/package.json +8 -8
- package/dist/browser.cjs.min.js +0 -15
- package/dist/browser.cjs.min.js.map +0 -1
- package/dist/browser.esm.min.js +0 -15
- package/dist/browser.esm.min.js.map +0 -1
- package/dist/bundle.cjs.min.js +0 -15
- package/dist/bundle.cjs.min.js.map +0 -1
- package/dist/bundle.esm.min.js +0 -15
- package/dist/bundle.esm.min.js.map +0 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
-
|
|
7
5
|
var tslib = require('tslib');
|
|
8
|
-
var crypto =
|
|
6
|
+
var crypto = require('crypto');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
|
9
11
|
|
|
10
12
|
function delay() {
|
|
11
13
|
var args = [];
|
|
@@ -123,7 +125,7 @@ var hexRegex = /^(#|0x)?([A-Fa-f0-9]{6})$/;
|
|
|
123
125
|
* Constructs a new color with the given red, green, blue and alpha values. If
|
|
124
126
|
* alpha is undefined, defaults to 1.
|
|
125
127
|
*/
|
|
126
|
-
var create = function (r, g, b, a) {
|
|
128
|
+
var create$2 = function (r, g, b, a) {
|
|
127
129
|
if (a === void 0) { a = 255; }
|
|
128
130
|
return { r: r, g: g, b: b, a: a };
|
|
129
131
|
};
|
|
@@ -134,7 +136,7 @@ var create = function (r, g, b, a) {
|
|
|
134
136
|
var fromNumber = function (num) {
|
|
135
137
|
// tslint:disable:no-bitwise
|
|
136
138
|
var normalized = num & 0xffffff;
|
|
137
|
-
return create((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
|
|
139
|
+
return create$2((normalized >> 16) & 0xff, (normalized >> 8) & 0xff, normalized & 0xff);
|
|
138
140
|
// tslint:enable:no-bitwise
|
|
139
141
|
};
|
|
140
142
|
/**
|
|
@@ -156,11 +158,11 @@ var fromHexString = function (str) {
|
|
|
156
158
|
var fromCss = function (css) {
|
|
157
159
|
var rgbMatch = rgbRegex.exec(css);
|
|
158
160
|
if (rgbMatch != null) {
|
|
159
|
-
return create(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
|
|
161
|
+
return create$2(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
|
|
160
162
|
}
|
|
161
163
|
var rgbaMatch = rgbaRegex.exec(css);
|
|
162
164
|
if (rgbaMatch != null) {
|
|
163
|
-
return create(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
|
|
165
|
+
return create$2(parseInt(rgbaMatch[1]), parseInt(rgbaMatch[2]), parseInt(rgbaMatch[3]), Math.floor(parseFloat(rgbaMatch[4]) * 255));
|
|
164
166
|
}
|
|
165
167
|
if (hexRegex.test(css)) {
|
|
166
168
|
return fromHexString(css);
|
|
@@ -171,7 +173,7 @@ var fromCss = function (css) {
|
|
|
171
173
|
* expected to be `[r, g, b]` or `[r, g, b, a]`.
|
|
172
174
|
*/
|
|
173
175
|
var fromArray = function (rgba) {
|
|
174
|
-
return create(rgba[0], rgba[1], rgba[2], rgba[3]);
|
|
176
|
+
return create$2(rgba[0], rgba[1], rgba[2], rgba[3]);
|
|
175
177
|
};
|
|
176
178
|
/**
|
|
177
179
|
* Returns `true` if the color's alpha channel is 0.
|
|
@@ -199,7 +201,7 @@ var componentToHex = function (num) {
|
|
|
199
201
|
|
|
200
202
|
var color = /*#__PURE__*/Object.freeze({
|
|
201
203
|
__proto__: null,
|
|
202
|
-
create: create,
|
|
204
|
+
create: create$2,
|
|
203
205
|
fromNumber: fromNumber,
|
|
204
206
|
fromHexString: fromHexString,
|
|
205
207
|
fromCss: fromCss,
|
|
@@ -587,7 +589,7 @@ function isObjectObject(o) {
|
|
|
587
589
|
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
588
590
|
}
|
|
589
591
|
|
|
590
|
-
function isPlainObject(o) {
|
|
592
|
+
function isPlainObject$1(o) {
|
|
591
593
|
var ctor,prot;
|
|
592
594
|
|
|
593
595
|
if (isObjectObject(o) === false) return false;
|
|
@@ -611,11 +613,8 @@ function isPlainObject(o) {
|
|
|
611
613
|
|
|
612
614
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
613
615
|
|
|
614
|
-
|
|
615
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
616
|
-
}
|
|
616
|
+
var lodash_isequal = {exports: {}};
|
|
617
617
|
|
|
618
|
-
var lodash_isequal = createCommonjsModule(function (module, exports) {
|
|
619
618
|
/**
|
|
620
619
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
621
620
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -625,6 +624,7 @@ var lodash_isequal = createCommonjsModule(function (module, exports) {
|
|
|
625
624
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
626
625
|
*/
|
|
627
626
|
|
|
627
|
+
(function (module, exports) {
|
|
628
628
|
/** Used as the size to enable large array optimizations. */
|
|
629
629
|
var LARGE_ARRAY_SIZE = 200;
|
|
630
630
|
|
|
@@ -710,7 +710,7 @@ var freeSelf = typeof self == 'object' && self && self.Object === Object && self
|
|
|
710
710
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
711
711
|
|
|
712
712
|
/** Detect free variable `exports`. */
|
|
713
|
-
var freeExports =
|
|
713
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
714
714
|
|
|
715
715
|
/** Detect free variable `module`. */
|
|
716
716
|
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
@@ -2464,7 +2464,9 @@ function stubFalse() {
|
|
|
2464
2464
|
}
|
|
2465
2465
|
|
|
2466
2466
|
module.exports = isEqual;
|
|
2467
|
-
});
|
|
2467
|
+
}(lodash_isequal, lodash_isequal.exports));
|
|
2468
|
+
|
|
2469
|
+
var areEqual = lodash_isequal.exports;
|
|
2468
2470
|
|
|
2469
2471
|
function defaults() {
|
|
2470
2472
|
var objects = [];
|
|
@@ -2482,7 +2484,7 @@ function defaults() {
|
|
|
2482
2484
|
if (result[key] == null) {
|
|
2483
2485
|
result[key] = b[key];
|
|
2484
2486
|
}
|
|
2485
|
-
else if (isPlainObject
|
|
2487
|
+
else if (isPlainObject(result[key])) {
|
|
2486
2488
|
result[key] = defaults(result[key], b[key]);
|
|
2487
2489
|
}
|
|
2488
2490
|
}
|
|
@@ -2512,8 +2514,8 @@ function defaults() {
|
|
|
2512
2514
|
* isPlainObject(Object.create(null)); //=> false
|
|
2513
2515
|
* ```
|
|
2514
2516
|
*/
|
|
2515
|
-
function isPlainObject
|
|
2516
|
-
return isPlainObject(obj);
|
|
2517
|
+
function isPlainObject(obj) {
|
|
2518
|
+
return isPlainObject$1(obj);
|
|
2517
2519
|
}
|
|
2518
2520
|
/**
|
|
2519
2521
|
* Performs a deep comparison of two objects and returns `true` if they're
|
|
@@ -2529,8 +2531,8 @@ function isPlainObject$1(obj) {
|
|
|
2529
2531
|
* @param b The object to compare with `a`.
|
|
2530
2532
|
* @returns `true` if the two objects are equal. Otherwise `false`.
|
|
2531
2533
|
*/
|
|
2532
|
-
function isEqual(a, b) {
|
|
2533
|
-
return
|
|
2534
|
+
function isEqual$1(a, b) {
|
|
2535
|
+
return areEqual(a, b);
|
|
2534
2536
|
}
|
|
2535
2537
|
function toPairs(obj) {
|
|
2536
2538
|
if (obj != null) {
|
|
@@ -2561,8 +2563,8 @@ function fromPairs(pairs) {
|
|
|
2561
2563
|
var objects = /*#__PURE__*/Object.freeze({
|
|
2562
2564
|
__proto__: null,
|
|
2563
2565
|
defaults: defaults,
|
|
2564
|
-
isPlainObject: isPlainObject
|
|
2565
|
-
isEqual: isEqual,
|
|
2566
|
+
isPlainObject: isPlainObject,
|
|
2567
|
+
isEqual: isEqual$1,
|
|
2566
2568
|
toPairs: toPairs,
|
|
2567
2569
|
fromPairs: fromPairs
|
|
2568
2570
|
});
|
|
@@ -2824,7 +2826,7 @@ var parseAndAddParams = function (baseStr, params) {
|
|
|
2824
2826
|
var base = parse(baseStr);
|
|
2825
2827
|
return params ? addQueryParams(params, base) : base;
|
|
2826
2828
|
};
|
|
2827
|
-
var isEqual
|
|
2829
|
+
var isEqual = function (a, b) {
|
|
2828
2830
|
var queryA = JSON.stringify(sortByQueryName(queryAsArray(a)));
|
|
2829
2831
|
var queryB = JSON.stringify(sortByQueryName(queryAsArray(b)));
|
|
2830
2832
|
return (a.scheme === b.scheme &&
|
|
@@ -2943,7 +2945,7 @@ var uri = /*#__PURE__*/Object.freeze({
|
|
|
2943
2945
|
__proto__: null,
|
|
2944
2946
|
parse: parse,
|
|
2945
2947
|
parseAndAddParams: parseAndAddParams,
|
|
2946
|
-
isEqual: isEqual
|
|
2948
|
+
isEqual: isEqual,
|
|
2947
2949
|
replacePath: replacePath,
|
|
2948
2950
|
pathAsArray: pathAsArray,
|
|
2949
2951
|
appendPath: appendPath,
|
|
@@ -2962,7 +2964,7 @@ const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
|
|
|
2962
2964
|
let poolPtr = rnds8Pool.length;
|
|
2963
2965
|
function rng() {
|
|
2964
2966
|
if (poolPtr > rnds8Pool.length - 16) {
|
|
2965
|
-
|
|
2967
|
+
crypto__default["default"].randomFillSync(rnds8Pool);
|
|
2966
2968
|
poolPtr = 0;
|
|
2967
2969
|
}
|
|
2968
2970
|
|
|
@@ -3094,11 +3096,11 @@ function v1(options, buf, offset) {
|
|
|
3094
3096
|
return buf || stringify(b);
|
|
3095
3097
|
}
|
|
3096
3098
|
|
|
3097
|
-
var create
|
|
3099
|
+
var create = function () { return v1(); };
|
|
3098
3100
|
|
|
3099
3101
|
var uuid = /*#__PURE__*/Object.freeze({
|
|
3100
3102
|
__proto__: null,
|
|
3101
|
-
create: create
|
|
3103
|
+
create: create
|
|
3102
3104
|
});
|
|
3103
3105
|
|
|
3104
3106
|
var EventDispatcher = /** @class */ (function () {
|