@wix/filter-builder 1.0.226 → 1.0.229
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/cjs/type-utils.js +37 -14
- package/dist/cjs/type-utils.js.map +1 -1
- package/dist/esm/type-utils.js +40 -13
- package/dist/esm/type-utils.js.map +1 -1
- package/dist/statics/filter-builder.umd.js +1 -161
- package/dist/statics/filter-builder.umd.js.map +1 -1
- package/dist/statics/filter-builder.umd.min.js +1 -1
- package/dist/statics/filter-builder.umd.min.js.map +1 -1
- package/dist/statics/manifest.json +1 -1
- package/dist/statics/manifest.min.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/type-utils.d.ts +3 -3
- package/dist/types/type-utils.d.ts.map +1 -1
- package/package.json +2 -3
package/dist/cjs/type-utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
exports.__esModule = true;
|
|
5
4
|
exports.isArray = isArray;
|
|
6
5
|
exports.isBoolean = isBoolean;
|
|
@@ -12,36 +11,60 @@ exports.isObject = isObject;
|
|
|
12
11
|
exports.isString = isString;
|
|
13
12
|
exports.isUndefined = isUndefined;
|
|
14
13
|
exports.typeForDisplay = typeForDisplay;
|
|
15
|
-
var _kindOf = _interopRequireDefault(require("kind-of"));
|
|
16
14
|
function isObject(obj) {
|
|
17
|
-
return
|
|
15
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
18
16
|
}
|
|
19
17
|
function isArray(arr) {
|
|
20
|
-
return
|
|
18
|
+
return Object.prototype.toString.call(arr) === '[object Array]';
|
|
21
19
|
}
|
|
22
20
|
function isDate(obj) {
|
|
23
|
-
return
|
|
21
|
+
return Object.prototype.toString.call(obj) === '[object Date]';
|
|
24
22
|
}
|
|
25
23
|
function isNumber(obj) {
|
|
26
|
-
return
|
|
24
|
+
return typeof obj === 'number';
|
|
27
25
|
}
|
|
28
26
|
function isBoolean(obj) {
|
|
29
|
-
return
|
|
27
|
+
return typeof obj === 'boolean';
|
|
30
28
|
}
|
|
31
29
|
function isString(obj) {
|
|
32
|
-
return
|
|
30
|
+
return typeof obj === 'string';
|
|
33
31
|
}
|
|
34
32
|
function isFunction(obj) {
|
|
35
|
-
return
|
|
36
|
-
}
|
|
37
|
-
function typeForDisplay(obj) {
|
|
38
|
-
return upperCaseFirst((0, _kindOf.default)(obj));
|
|
33
|
+
return typeof obj === 'function';
|
|
39
34
|
}
|
|
40
35
|
function isUndefined(obj) {
|
|
41
|
-
return
|
|
36
|
+
return obj === void 0;
|
|
42
37
|
}
|
|
43
38
|
function isNull(obj) {
|
|
44
|
-
return
|
|
39
|
+
return obj === null;
|
|
40
|
+
}
|
|
41
|
+
function typeForDisplay(obj) {
|
|
42
|
+
if (typeof obj === 'number') {
|
|
43
|
+
return 'Number';
|
|
44
|
+
}
|
|
45
|
+
if (typeof obj === 'boolean') {
|
|
46
|
+
return 'Boolean';
|
|
47
|
+
}
|
|
48
|
+
if (typeof obj === 'string') {
|
|
49
|
+
return 'String';
|
|
50
|
+
}
|
|
51
|
+
if (isArray(obj)) {
|
|
52
|
+
return 'Array';
|
|
53
|
+
}
|
|
54
|
+
if (isDate(obj)) {
|
|
55
|
+
return 'Date';
|
|
56
|
+
}
|
|
57
|
+
if (isObject(obj)) {
|
|
58
|
+
return 'Object';
|
|
59
|
+
}
|
|
60
|
+
if (isUndefined(obj)) {
|
|
61
|
+
return 'Undefined';
|
|
62
|
+
}
|
|
63
|
+
if (isNull(obj)) {
|
|
64
|
+
return 'Null';
|
|
65
|
+
}
|
|
66
|
+
const type = Object.prototype.toString.call(obj).slice(8, -1).replace(/\s/g, '');
|
|
67
|
+
return upperCaseFirst(type);
|
|
45
68
|
}
|
|
46
69
|
function upperCaseFirst(str) {
|
|
47
70
|
if (!isString(str)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isObject","obj","Object","prototype","toString","call","isArray","arr","isDate","isNumber","isBoolean","isString","isFunction","isUndefined","isNull","typeForDisplay","type","slice","replace","upperCaseFirst","str","first","toUpperCase","rest","length"],"sources":["../../src/type-utils.ts"],"sourcesContent":["export function isObject(obj: any): obj is Record<keyof any, any> {\n return Object.prototype.toString.call(obj) === '[object Object]'\n}\nexport function isArray(arr: any): arr is any[] {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n\nexport function isDate(obj: any) {\n return Object.prototype.toString.call(obj) === '[object Date]'\n}\n\nexport function isNumber(obj: any) {\n return typeof obj === 'number'\n}\n\nexport function isBoolean(obj: any) {\n return typeof obj === 'boolean'\n}\n\nexport function isString(obj: any) {\n return typeof obj === 'string'\n}\n\nexport function isFunction(obj: any) {\n return typeof obj === 'function'\n}\n\nexport function isUndefined(obj: any) {\n return obj === void 0\n}\n\nexport function isNull(obj: any) {\n return obj === null\n}\n\nexport function typeForDisplay(obj: any) {\n if (typeof obj === 'number') {\n return 'Number'\n }\n if (typeof obj === 'boolean') {\n return 'Boolean'\n }\n if (typeof obj === 'string') {\n return 'String'\n }\n if (isArray(obj)) {\n return 'Array'\n }\n if (isDate(obj)) {\n return 'Date'\n }\n if (isObject(obj)) {\n return 'Object'\n }\n if (isUndefined(obj)) {\n return 'Undefined'\n }\n if (isNull(obj)) {\n return 'Null'\n }\n const type = Object.prototype.toString\n .call(obj)\n .slice(8, -1)\n .replace(/\\s/g, '')\n return upperCaseFirst(type)\n}\n\nfunction upperCaseFirst(str: any) {\n if (!isString(str)) {\n return str\n }\n const first = str.slice(0, 1).toUpperCase()\n const rest = str.slice(1, str.length)\n return first + rest\n}\n"],"mappings":";;;;;;;;;;;;;AAAO,SAASA,QAAQA,CAACC,GAAQ,EAAiC;EAChE,OAAOC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACJ,GAAG,CAAC,KAAK,iBAAiB;AAClE;AAC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AAC,EAAE;IACpB,OAAO,WAAW;EACpB;EACA,IAAIa,MAAM,CAACb,GAAG,CAAC,EAAE;IACf,OAAO,MAAM;EACf;EACA,MAAMe,IAAI,GAAGd,MAAM,CAACC,SAAS,CAACC,QAAQ,CACnCC,IAAI,CAACJ,GAAG,CAAC,CACTgB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACZC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EACrB,OAAOC,cAAc,CAACH,IAAI,CAAC;AAC7B;AAEA,SAASG,cAAcA,CAACC,GAAQ,EAAE;EAChC,IAAI,CAACT,QAAQ,CAACS,GAAG,CAAC,EAAE;IAClB,OAAOA,GAAG;EACZ;EACA,MAAMC,KAAK,GAAGD,GAAG,CAACH,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAACK,WAAW,CAAC,CAAC;EAC3C,MAAMC,IAAI,GAAGH,GAAG,CAACH,KAAK,CAAC,CAAC,EAAEG,GAAG,CAACI,MAAM,CAAC;EACrC,OAAOH,KAAK,GAAGE,IAAI;AACrB","ignoreList":[]}
|
package/dist/esm/type-utils.js
CHANGED
|
@@ -1,33 +1,60 @@
|
|
|
1
|
-
import getKind from 'kind-of';
|
|
2
1
|
export function isObject(obj) {
|
|
3
|
-
return
|
|
2
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
4
3
|
}
|
|
5
4
|
export function isArray(arr) {
|
|
6
|
-
return
|
|
5
|
+
return Object.prototype.toString.call(arr) === '[object Array]';
|
|
7
6
|
}
|
|
8
7
|
export function isDate(obj) {
|
|
9
|
-
return
|
|
8
|
+
return Object.prototype.toString.call(obj) === '[object Date]';
|
|
10
9
|
}
|
|
11
10
|
export function isNumber(obj) {
|
|
12
|
-
return
|
|
11
|
+
return typeof obj === 'number';
|
|
13
12
|
}
|
|
14
13
|
export function isBoolean(obj) {
|
|
15
|
-
return
|
|
14
|
+
return typeof obj === 'boolean';
|
|
16
15
|
}
|
|
17
16
|
export function isString(obj) {
|
|
18
|
-
return
|
|
17
|
+
return typeof obj === 'string';
|
|
19
18
|
}
|
|
20
19
|
export function isFunction(obj) {
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
export function typeForDisplay(obj) {
|
|
24
|
-
return upperCaseFirst(getKind(obj));
|
|
20
|
+
return typeof obj === 'function';
|
|
25
21
|
}
|
|
26
22
|
export function isUndefined(obj) {
|
|
27
|
-
return
|
|
23
|
+
return obj === void 0;
|
|
28
24
|
}
|
|
29
25
|
export function isNull(obj) {
|
|
30
|
-
return
|
|
26
|
+
return obj === null;
|
|
27
|
+
}
|
|
28
|
+
export function typeForDisplay(obj) {
|
|
29
|
+
if (typeof obj === 'number') {
|
|
30
|
+
return 'Number';
|
|
31
|
+
}
|
|
32
|
+
if (typeof obj === 'boolean') {
|
|
33
|
+
return 'Boolean';
|
|
34
|
+
}
|
|
35
|
+
if (typeof obj === 'string') {
|
|
36
|
+
return 'String';
|
|
37
|
+
}
|
|
38
|
+
if (isArray(obj)) {
|
|
39
|
+
return 'Array';
|
|
40
|
+
}
|
|
41
|
+
if (isDate(obj)) {
|
|
42
|
+
return 'Date';
|
|
43
|
+
}
|
|
44
|
+
if (isObject(obj)) {
|
|
45
|
+
return 'Object';
|
|
46
|
+
}
|
|
47
|
+
if (isUndefined(obj)) {
|
|
48
|
+
return 'Undefined';
|
|
49
|
+
}
|
|
50
|
+
if (isNull(obj)) {
|
|
51
|
+
return 'Null';
|
|
52
|
+
}
|
|
53
|
+
const type = Object.prototype.toString
|
|
54
|
+
.call(obj)
|
|
55
|
+
.slice(8, -1)
|
|
56
|
+
.replace(/\s/g, '');
|
|
57
|
+
return upperCaseFirst(type);
|
|
31
58
|
}
|
|
32
59
|
function upperCaseFirst(str) {
|
|
33
60
|
if (!isString(str)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-utils.js","sourceRoot":"","sources":["../../src/type-utils.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":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G,KAAK,QAAQ,EAAE;QAC3B,OAAO,QAAQ,CAAA;KAChB;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,OAAO,OAAO,CAAA;KACf;IACD,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;QACf,OAAO,MAAM,CAAA;KACd;IACD,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE;QACjB,OAAO,QAAQ,CAAA;KAChB;IACD,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,OAAO,WAAW,CAAA;KACnB;IACD,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;QACf,OAAO,MAAM,CAAA;KACd;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ;SACnC,IAAI,CAAC,GAAG,CAAC;SACT,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACrB,OAAO,cAAc,CAAC,IAAI,CAAC,CAAA;AAC7B,CAAC;AAED,SAAS,cAAc,CAAC,GAAQ;IAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAClB,OAAO,GAAG,CAAA;KACX;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAA;IAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACrC,OAAO,KAAK,GAAG,IAAI,CAAA;AACrB,CAAC"}
|
|
@@ -63,163 +63,6 @@ function toPropertyKey(t) {
|
|
|
63
63
|
}
|
|
64
64
|
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65
65
|
|
|
66
|
-
/***/ }),
|
|
67
|
-
|
|
68
|
-
/***/ 555:
|
|
69
|
-
/*!****************************************!*\
|
|
70
|
-
!*** ../node_modules/kind-of/index.js ***!
|
|
71
|
-
\****************************************/
|
|
72
|
-
/***/ ((module) => {
|
|
73
|
-
|
|
74
|
-
var toString = Object.prototype.toString;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Get the native `typeof` a value.
|
|
78
|
-
*
|
|
79
|
-
* @param {*} `val`
|
|
80
|
-
* @return {*} Native javascript type
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
module.exports = function kindOf(val) {
|
|
84
|
-
var type = typeof val;
|
|
85
|
-
|
|
86
|
-
// primitivies
|
|
87
|
-
if (type === 'undefined') {
|
|
88
|
-
return 'undefined';
|
|
89
|
-
}
|
|
90
|
-
if (val === null) {
|
|
91
|
-
return 'null';
|
|
92
|
-
}
|
|
93
|
-
if (val === true || val === false || val instanceof Boolean) {
|
|
94
|
-
return 'boolean';
|
|
95
|
-
}
|
|
96
|
-
if (type === 'string' || val instanceof String) {
|
|
97
|
-
return 'string';
|
|
98
|
-
}
|
|
99
|
-
if (type === 'number' || val instanceof Number) {
|
|
100
|
-
return 'number';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// functions
|
|
104
|
-
if (type === 'function' || val instanceof Function) {
|
|
105
|
-
if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') {
|
|
106
|
-
return 'generatorfunction';
|
|
107
|
-
}
|
|
108
|
-
return 'function';
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// array
|
|
112
|
-
if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) {
|
|
113
|
-
return 'array';
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// check for instances of RegExp and Date before calling `toString`
|
|
117
|
-
if (val instanceof RegExp) {
|
|
118
|
-
return 'regexp';
|
|
119
|
-
}
|
|
120
|
-
if (val instanceof Date) {
|
|
121
|
-
return 'date';
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// other objects
|
|
125
|
-
type = toString.call(val);
|
|
126
|
-
|
|
127
|
-
if (type === '[object RegExp]') {
|
|
128
|
-
return 'regexp';
|
|
129
|
-
}
|
|
130
|
-
if (type === '[object Date]') {
|
|
131
|
-
return 'date';
|
|
132
|
-
}
|
|
133
|
-
if (type === '[object Arguments]') {
|
|
134
|
-
return 'arguments';
|
|
135
|
-
}
|
|
136
|
-
if (type === '[object Error]') {
|
|
137
|
-
return 'error';
|
|
138
|
-
}
|
|
139
|
-
if (type === '[object Promise]') {
|
|
140
|
-
return 'promise';
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// buffer
|
|
144
|
-
if (isBuffer(val)) {
|
|
145
|
-
return 'buffer';
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// es6: Map, WeakMap, Set, WeakSet
|
|
149
|
-
if (type === '[object Set]') {
|
|
150
|
-
return 'set';
|
|
151
|
-
}
|
|
152
|
-
if (type === '[object WeakSet]') {
|
|
153
|
-
return 'weakset';
|
|
154
|
-
}
|
|
155
|
-
if (type === '[object Map]') {
|
|
156
|
-
return 'map';
|
|
157
|
-
}
|
|
158
|
-
if (type === '[object WeakMap]') {
|
|
159
|
-
return 'weakmap';
|
|
160
|
-
}
|
|
161
|
-
if (type === '[object Symbol]') {
|
|
162
|
-
return 'symbol';
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (type === '[object Map Iterator]') {
|
|
166
|
-
return 'mapiterator';
|
|
167
|
-
}
|
|
168
|
-
if (type === '[object Set Iterator]') {
|
|
169
|
-
return 'setiterator';
|
|
170
|
-
}
|
|
171
|
-
if (type === '[object String Iterator]') {
|
|
172
|
-
return 'stringiterator';
|
|
173
|
-
}
|
|
174
|
-
if (type === '[object Array Iterator]') {
|
|
175
|
-
return 'arrayiterator';
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// typed arrays
|
|
179
|
-
if (type === '[object Int8Array]') {
|
|
180
|
-
return 'int8array';
|
|
181
|
-
}
|
|
182
|
-
if (type === '[object Uint8Array]') {
|
|
183
|
-
return 'uint8array';
|
|
184
|
-
}
|
|
185
|
-
if (type === '[object Uint8ClampedArray]') {
|
|
186
|
-
return 'uint8clampedarray';
|
|
187
|
-
}
|
|
188
|
-
if (type === '[object Int16Array]') {
|
|
189
|
-
return 'int16array';
|
|
190
|
-
}
|
|
191
|
-
if (type === '[object Uint16Array]') {
|
|
192
|
-
return 'uint16array';
|
|
193
|
-
}
|
|
194
|
-
if (type === '[object Int32Array]') {
|
|
195
|
-
return 'int32array';
|
|
196
|
-
}
|
|
197
|
-
if (type === '[object Uint32Array]') {
|
|
198
|
-
return 'uint32array';
|
|
199
|
-
}
|
|
200
|
-
if (type === '[object Float32Array]') {
|
|
201
|
-
return 'float32array';
|
|
202
|
-
}
|
|
203
|
-
if (type === '[object Float64Array]') {
|
|
204
|
-
return 'float64array';
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// must be a plain object
|
|
208
|
-
return 'object';
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* If you need to support Safari 5-7 (8-10 yr-old browser),
|
|
213
|
-
* take a look at https://github.com/feross/is-buffer
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
function isBuffer(val) {
|
|
217
|
-
return val.constructor
|
|
218
|
-
&& typeof val.constructor.isBuffer === 'function'
|
|
219
|
-
&& val.constructor.isBuffer(val);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
66
|
/***/ }),
|
|
224
67
|
|
|
225
68
|
/***/ 878:
|
|
@@ -334,11 +177,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
334
177
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/helpers/defineProperty.js
|
|
335
178
|
var defineProperty = __webpack_require__(212);
|
|
336
179
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
337
|
-
// EXTERNAL MODULE: ../node_modules/kind-of/index.js
|
|
338
|
-
var kind_of = __webpack_require__(555);
|
|
339
|
-
var kind_of_default = /*#__PURE__*/__webpack_require__.n(kind_of);
|
|
340
180
|
;// ./type-utils.ts
|
|
341
|
-
function isObject(obj){return
|
|
181
|
+
function isObject(obj){return Object.prototype.toString.call(obj)==='[object Object]';}function isArray(arr){return Object.prototype.toString.call(arr)==='[object Array]';}function isDate(obj){return Object.prototype.toString.call(obj)==='[object Date]';}function isNumber(obj){return typeof obj==='number';}function isBoolean(obj){return typeof obj==='boolean';}function isString(obj){return typeof obj==='string';}function isFunction(obj){return typeof obj==='function';}function isUndefined(obj){return obj===void 0;}function isNull(obj){return obj===null;}function typeForDisplay(obj){if(typeof obj==='number'){return'Number';}if(typeof obj==='boolean'){return'Boolean';}if(typeof obj==='string'){return'String';}if(isArray(obj)){return'Array';}if(isDate(obj)){return'Date';}if(isObject(obj)){return'Object';}if(isUndefined(obj)){return'Undefined';}if(isNull(obj)){return'Null';}const type=Object.prototype.toString.call(obj).slice(8,-1).replace(/\s/g,'');return upperCaseFirst(type);}function upperCaseFirst(str){if(!isString(str)){return str;}const first=str.slice(0,1).toUpperCase();const rest=str.slice(1,str.length);return first+rest;}
|
|
342
182
|
;// ./clone.ts
|
|
343
183
|
function clone(obj){if(obj==null||typeof obj!=='object'){return obj;}let temp=null;if(isDate(obj)){temp=new Date(obj.getTime());}else{temp=obj.constructor();for(const key in obj){temp[key]=clone(obj[key]);}}return temp;}
|
|
344
184
|
;// ./filter-validator.ts
|