decord/source/722_isKey.js

50 lines
1 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 722
// Function ID: 723
2026-07-20 16:05:17 +00:00
// Name: isKey
2026-07-29 08:29:29 +00:00
// Dependencies: [599, 638]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 722 (isKey)
2026-08-24 06:08:38 +00:00
import _mod599 from "module_599" /* 599 */;
import isSymbol from "isSymbol" /* 638 */;
2026-07-23 10:11:24 +00:00
const re2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
const re3 = /^\w*$/;
2026-07-20 16:05:17 +00:00
2026-08-04 21:03:28 +00:00
export default function isKey(num) {
2026-08-24 06:08:38 +00:00
if (_mod599(num)) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-08-04 21:03:28 +00:00
let tmp3 = typeof num !== "number";
if (typeof num !== "number") {
tmp3 = typeof num !== "symbol";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-04 21:03:28 +00:00
tmp3 = typeof num !== "boolean";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-04 21:03:28 +00:00
tmp3 = null != num;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp3) {
2026-08-24 06:08:38 +00:00
tmp3 = !isSymbol(num);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp5 = !tmp3;
if (tmp3) {
2026-08-04 21:03:28 +00:00
let isMatch = regex2.test(num);
2026-07-20 16:05:17 +00:00
if (!isMatch) {
2026-08-04 21:03:28 +00:00
isMatch = !regex.test(num);
2026-07-20 16:05:17 +00:00
}
if (!isMatch) {
let tmp11 = null != arg1;
if (tmp11) {
const _Object = Object;
2026-08-04 21:03:28 +00:00
tmp11 = num in Object(arg1);
2026-07-20 16:05:17 +00:00
}
isMatch = tmp11;
}
2026-07-29 08:29:29 +00:00
tmp5 = isMatch;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp5;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const tmp = require;
2026-07-20 16:05:17 +00:00
};