@cloudcare/browser-core 2.0.15 → 2.0.16
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/cjs/helper/enums.js +1 -0
- package/cjs/helper/tools.js +6 -0
- package/esm/helper/enums.js +1 -0
- package/esm/helper/tools.js +4 -0
- package/package.json +2 -2
- package/src/helper/enums.js +1 -0
- package/src/helper/tools.js +6 -1
package/cjs/helper/enums.js
CHANGED
package/cjs/helper/tools.js
CHANGED
|
@@ -48,6 +48,7 @@ exports.isFunction = exports.isEmptyObject = exports.isElement = exports.isDate
|
|
|
48
48
|
exports.isHashAnAnchor = isHashAnAnchor;
|
|
49
49
|
exports.isIE = isIE;
|
|
50
50
|
exports.isJSONString = void 0;
|
|
51
|
+
exports.isMatchOption = isMatchOption;
|
|
51
52
|
exports.isNullUndefinedDefaultValue = isNullUndefinedDefaultValue;
|
|
52
53
|
exports.isObject = exports.isNumber = void 0;
|
|
53
54
|
exports.isPercentage = isPercentage;
|
|
@@ -1889,6 +1890,11 @@ function safeTruncate(candidate, length) {
|
|
|
1889
1890
|
return candidate.slice(0, length);
|
|
1890
1891
|
}
|
|
1891
1892
|
|
|
1893
|
+
function isMatchOption(item) {
|
|
1894
|
+
var itemType = getType(item);
|
|
1895
|
+
return itemType === 'string' || itemType === 'function' || item instanceof RegExp;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1892
1898
|
function includes(candidate, search) {
|
|
1893
1899
|
// tslint:disable-next-line: no-unsafe-any
|
|
1894
1900
|
return candidate.indexOf(search) !== -1;
|
package/esm/helper/enums.js
CHANGED
package/esm/helper/tools.js
CHANGED
|
@@ -1558,6 +1558,10 @@ export function safeTruncate(candidate, length) {
|
|
|
1558
1558
|
|
|
1559
1559
|
return candidate.slice(0, length);
|
|
1560
1560
|
}
|
|
1561
|
+
export function isMatchOption(item) {
|
|
1562
|
+
var itemType = getType(item);
|
|
1563
|
+
return itemType === 'string' || itemType === 'function' || item instanceof RegExp;
|
|
1564
|
+
}
|
|
1561
1565
|
export function includes(candidate, search) {
|
|
1562
1566
|
// tslint:disable-next-line: no-unsafe-any
|
|
1563
1567
|
return candidate.indexOf(search) !== -1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudcare/browser-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"author": "dataflux",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"description": "DataFlux RUM Web 端数据指标监控",
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "d68cc2e25637dbe6a09461ca4186b882f878c169"
|
|
24
24
|
}
|
package/src/helper/enums.js
CHANGED
package/src/helper/tools.js
CHANGED
|
@@ -1542,7 +1542,12 @@ export function safeTruncate(candidate, length) {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
return candidate.slice(0, length)
|
|
1544
1544
|
}
|
|
1545
|
-
|
|
1545
|
+
export function isMatchOption(item) {
|
|
1546
|
+
const itemType = getType(item)
|
|
1547
|
+
return (
|
|
1548
|
+
itemType === 'string' || itemType === 'function' || item instanceof RegExp
|
|
1549
|
+
)
|
|
1550
|
+
}
|
|
1546
1551
|
export function includes(candidate, search) {
|
|
1547
1552
|
// tslint:disable-next-line: no-unsafe-any
|
|
1548
1553
|
return candidate.indexOf(search) !== -1
|