langsmith 0.5.17 → 0.5.19
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/anonymizer/index.cjs +46 -20
- package/dist/anonymizer/index.js +46 -17
- package/dist/client.cjs +24 -0
- package/dist/client.d.ts +5 -0
- package/dist/client.js +24 -0
- package/dist/experimental/anthropic/context.cjs +5 -0
- package/dist/experimental/anthropic/context.js +5 -0
- package/dist/experimental/anthropic/index.cjs +1 -0
- package/dist/experimental/anthropic/index.js +1 -0
- package/dist/experimental/sandbox/client.cjs +2 -0
- package/dist/experimental/sandbox/client.d.ts +2 -0
- package/dist/experimental/sandbox/client.js +2 -0
- package/dist/experimental/sandbox/index.cjs +0 -3
- package/dist/experimental/sandbox/index.js +0 -3
- package/dist/experimental/sandbox/sandbox.cjs +2 -0
- package/dist/experimental/sandbox/sandbox.d.ts +2 -0
- package/dist/experimental/sandbox/sandbox.js +2 -0
- package/dist/experimental/vercel/index.cjs +11 -0
- package/dist/experimental/vercel/index.js +12 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/utils/lodash/assignValue.cjs +0 -29
- package/dist/utils/lodash/assignValue.d.ts +0 -10
- package/dist/utils/lodash/assignValue.js +0 -24
- package/dist/utils/lodash/baseAssignValue.cjs +0 -25
- package/dist/utils/lodash/baseAssignValue.d.ts +0 -11
- package/dist/utils/lodash/baseAssignValue.js +0 -23
- package/dist/utils/lodash/baseSet.cjs +0 -50
- package/dist/utils/lodash/baseSet.d.ts +0 -12
- package/dist/utils/lodash/baseSet.js +0 -45
- package/dist/utils/lodash/castPath.cjs +0 -22
- package/dist/utils/lodash/castPath.d.ts +0 -10
- package/dist/utils/lodash/castPath.js +0 -17
- package/dist/utils/lodash/eq.cjs +0 -36
- package/dist/utils/lodash/eq.d.ts +0 -32
- package/dist/utils/lodash/eq.js +0 -34
- package/dist/utils/lodash/getTag.cjs +0 -18
- package/dist/utils/lodash/getTag.d.ts +0 -9
- package/dist/utils/lodash/getTag.js +0 -16
- package/dist/utils/lodash/isIndex.cjs +0 -25
- package/dist/utils/lodash/isIndex.d.ts +0 -10
- package/dist/utils/lodash/isIndex.js +0 -23
- package/dist/utils/lodash/isKey.cjs +0 -34
- package/dist/utils/lodash/isKey.d.ts +0 -10
- package/dist/utils/lodash/isKey.js +0 -29
- package/dist/utils/lodash/isObject.cjs +0 -31
- package/dist/utils/lodash/isObject.d.ts +0 -25
- package/dist/utils/lodash/isObject.js +0 -29
- package/dist/utils/lodash/isSymbol.cjs +0 -28
- package/dist/utils/lodash/isSymbol.d.ts +0 -17
- package/dist/utils/lodash/isSymbol.js +0 -23
- package/dist/utils/lodash/memoizeCapped.cjs +0 -65
- package/dist/utils/lodash/memoizeCapped.d.ts +0 -50
- package/dist/utils/lodash/memoizeCapped.js +0 -63
- package/dist/utils/lodash/set.cjs +0 -41
- package/dist/utils/lodash/set.d.ts +0 -32
- package/dist/utils/lodash/set.js +0 -36
- package/dist/utils/lodash/stringToPath.cjs +0 -49
- package/dist/utils/lodash/stringToPath.d.ts +0 -12
- package/dist/utils/lodash/stringToPath.js +0 -44
- package/dist/utils/lodash/toKey.cjs +0 -24
- package/dist/utils/lodash/toKey.d.ts +0 -9
- package/dist/utils/lodash/toKey.js +0 -19
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
5
|
-
* value checks.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @param {Object} object The object to modify.
|
|
9
|
-
* @param {string} key The key of the property to assign.
|
|
10
|
-
* @param {*} value The value to assign.
|
|
11
|
-
*/
|
|
12
|
-
function baseAssignValue(object, key, value) {
|
|
13
|
-
if (key === "__proto__") {
|
|
14
|
-
Object.defineProperty(object, key, {
|
|
15
|
-
configurable: true,
|
|
16
|
-
enumerable: true,
|
|
17
|
-
value: value,
|
|
18
|
-
writable: true,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
object[key] = value;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.default = baseAssignValue;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
3
|
-
* value checks.
|
|
4
|
-
*
|
|
5
|
-
* @private
|
|
6
|
-
* @param {Object} object The object to modify.
|
|
7
|
-
* @param {string} key The key of the property to assign.
|
|
8
|
-
* @param {*} value The value to assign.
|
|
9
|
-
*/
|
|
10
|
-
declare function baseAssignValue(object: Record<string, any>, key: string, value: any): void;
|
|
11
|
-
export default baseAssignValue;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
3
|
-
* value checks.
|
|
4
|
-
*
|
|
5
|
-
* @private
|
|
6
|
-
* @param {Object} object The object to modify.
|
|
7
|
-
* @param {string} key The key of the property to assign.
|
|
8
|
-
* @param {*} value The value to assign.
|
|
9
|
-
*/
|
|
10
|
-
function baseAssignValue(object, key, value) {
|
|
11
|
-
if (key === "__proto__") {
|
|
12
|
-
Object.defineProperty(object, key, {
|
|
13
|
-
configurable: true,
|
|
14
|
-
enumerable: true,
|
|
15
|
-
value: value,
|
|
16
|
-
writable: true,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
object[key] = value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default baseAssignValue;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const assignValue_js_1 = __importDefault(require("./assignValue.cjs"));
|
|
8
|
-
const castPath_js_1 = __importDefault(require("./castPath.cjs"));
|
|
9
|
-
const isIndex_js_1 = __importDefault(require("./isIndex.cjs"));
|
|
10
|
-
const isObject_js_1 = __importDefault(require("./isObject.cjs"));
|
|
11
|
-
const toKey_js_1 = __importDefault(require("./toKey.cjs"));
|
|
12
|
-
/**
|
|
13
|
-
* The base implementation of `set`.
|
|
14
|
-
*
|
|
15
|
-
* @private
|
|
16
|
-
* @param {Object} object The object to modify.
|
|
17
|
-
* @param {Array|string} path The path of the property to set.
|
|
18
|
-
* @param {*} value The value to set.
|
|
19
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
20
|
-
* @returns {Object} Returns `object`.
|
|
21
|
-
*/
|
|
22
|
-
function baseSet(object, path, value, customizer) {
|
|
23
|
-
if (!(0, isObject_js_1.default)(object)) {
|
|
24
|
-
return object;
|
|
25
|
-
}
|
|
26
|
-
path = (0, castPath_js_1.default)(path, object);
|
|
27
|
-
const length = path.length;
|
|
28
|
-
const lastIndex = length - 1;
|
|
29
|
-
let index = -1;
|
|
30
|
-
let nested = object;
|
|
31
|
-
while (nested != null && ++index < length) {
|
|
32
|
-
const key = (0, toKey_js_1.default)(path[index]);
|
|
33
|
-
let newValue = value;
|
|
34
|
-
if (index !== lastIndex) {
|
|
35
|
-
const objValue = nested[key];
|
|
36
|
-
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
37
|
-
if (newValue === undefined) {
|
|
38
|
-
newValue = (0, isObject_js_1.default)(objValue)
|
|
39
|
-
? objValue
|
|
40
|
-
: (0, isIndex_js_1.default)(path[index + 1])
|
|
41
|
-
? []
|
|
42
|
-
: {};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
(0, assignValue_js_1.default)(nested, key, newValue);
|
|
46
|
-
nested = nested[key];
|
|
47
|
-
}
|
|
48
|
-
return object;
|
|
49
|
-
}
|
|
50
|
-
exports.default = baseSet;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The base implementation of `set`.
|
|
3
|
-
*
|
|
4
|
-
* @private
|
|
5
|
-
* @param {Object} object The object to modify.
|
|
6
|
-
* @param {Array|string} path The path of the property to set.
|
|
7
|
-
* @param {*} value The value to set.
|
|
8
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
9
|
-
* @returns {Object} Returns `object`.
|
|
10
|
-
*/
|
|
11
|
-
declare function baseSet(object: any, path: any, value: any, customizer: any): any;
|
|
12
|
-
export default baseSet;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import assignValue from "./assignValue.js";
|
|
3
|
-
import castPath from "./castPath.js";
|
|
4
|
-
import isIndex from "./isIndex.js";
|
|
5
|
-
import isObject from "./isObject.js";
|
|
6
|
-
import toKey from "./toKey.js";
|
|
7
|
-
/**
|
|
8
|
-
* The base implementation of `set`.
|
|
9
|
-
*
|
|
10
|
-
* @private
|
|
11
|
-
* @param {Object} object The object to modify.
|
|
12
|
-
* @param {Array|string} path The path of the property to set.
|
|
13
|
-
* @param {*} value The value to set.
|
|
14
|
-
* @param {Function} [customizer] The function to customize path creation.
|
|
15
|
-
* @returns {Object} Returns `object`.
|
|
16
|
-
*/
|
|
17
|
-
function baseSet(object, path, value, customizer) {
|
|
18
|
-
if (!isObject(object)) {
|
|
19
|
-
return object;
|
|
20
|
-
}
|
|
21
|
-
path = castPath(path, object);
|
|
22
|
-
const length = path.length;
|
|
23
|
-
const lastIndex = length - 1;
|
|
24
|
-
let index = -1;
|
|
25
|
-
let nested = object;
|
|
26
|
-
while (nested != null && ++index < length) {
|
|
27
|
-
const key = toKey(path[index]);
|
|
28
|
-
let newValue = value;
|
|
29
|
-
if (index !== lastIndex) {
|
|
30
|
-
const objValue = nested[key];
|
|
31
|
-
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
32
|
-
if (newValue === undefined) {
|
|
33
|
-
newValue = isObject(objValue)
|
|
34
|
-
? objValue
|
|
35
|
-
: isIndex(path[index + 1])
|
|
36
|
-
? []
|
|
37
|
-
: {};
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
assignValue(nested, key, newValue);
|
|
41
|
-
nested = nested[key];
|
|
42
|
-
}
|
|
43
|
-
return object;
|
|
44
|
-
}
|
|
45
|
-
export default baseSet;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const isKey_js_1 = __importDefault(require("./isKey.cjs"));
|
|
7
|
-
const stringToPath_js_1 = __importDefault(require("./stringToPath.cjs"));
|
|
8
|
-
/**
|
|
9
|
-
* Casts `value` to a path array if it's not one.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
* @param {*} value The value to inspect.
|
|
13
|
-
* @param {Object} [object] The object to query keys on.
|
|
14
|
-
* @returns {Array} Returns the cast property path array.
|
|
15
|
-
*/
|
|
16
|
-
function castPath(value, object) {
|
|
17
|
-
if (Array.isArray(value)) {
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
return (0, isKey_js_1.default)(value, object) ? [value] : (0, stringToPath_js_1.default)(value);
|
|
21
|
-
}
|
|
22
|
-
exports.default = castPath;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Casts `value` to a path array if it's not one.
|
|
3
|
-
*
|
|
4
|
-
* @private
|
|
5
|
-
* @param {*} value The value to inspect.
|
|
6
|
-
* @param {Object} [object] The object to query keys on.
|
|
7
|
-
* @returns {Array} Returns the cast property path array.
|
|
8
|
-
*/
|
|
9
|
-
declare function castPath(value: any, object: Record<string, any>): any;
|
|
10
|
-
export default castPath;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import isKey from "./isKey.js";
|
|
2
|
-
import stringToPath from "./stringToPath.js";
|
|
3
|
-
/**
|
|
4
|
-
* Casts `value` to a path array if it's not one.
|
|
5
|
-
*
|
|
6
|
-
* @private
|
|
7
|
-
* @param {*} value The value to inspect.
|
|
8
|
-
* @param {Object} [object] The object to query keys on.
|
|
9
|
-
* @returns {Array} Returns the cast property path array.
|
|
10
|
-
*/
|
|
11
|
-
function castPath(value, object) {
|
|
12
|
-
if (Array.isArray(value)) {
|
|
13
|
-
return value;
|
|
14
|
-
}
|
|
15
|
-
return isKey(value, object) ? [value] : stringToPath(value);
|
|
16
|
-
}
|
|
17
|
-
export default castPath;
|
package/dist/utils/lodash/eq.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* Performs a
|
|
5
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
6
|
-
* comparison between two values to determine if they are equivalent.
|
|
7
|
-
*
|
|
8
|
-
* @since 4.0.0
|
|
9
|
-
* @category Lang
|
|
10
|
-
* @param {*} value The value to compare.
|
|
11
|
-
* @param {*} other The other value to compare.
|
|
12
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
13
|
-
* @example
|
|
14
|
-
*
|
|
15
|
-
* const object = { 'a': 1 }
|
|
16
|
-
* const other = { 'a': 1 }
|
|
17
|
-
*
|
|
18
|
-
* eq(object, object)
|
|
19
|
-
* // => true
|
|
20
|
-
*
|
|
21
|
-
* eq(object, other)
|
|
22
|
-
* // => false
|
|
23
|
-
*
|
|
24
|
-
* eq('a', 'a')
|
|
25
|
-
* // => true
|
|
26
|
-
*
|
|
27
|
-
* eq('a', Object('a'))
|
|
28
|
-
* // => false
|
|
29
|
-
*
|
|
30
|
-
* eq(NaN, NaN)
|
|
31
|
-
* // => true
|
|
32
|
-
*/
|
|
33
|
-
function eq(value, other) {
|
|
34
|
-
return value === other || (value !== value && other !== other);
|
|
35
|
-
}
|
|
36
|
-
exports.default = eq;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performs a
|
|
3
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
4
|
-
* comparison between two values to determine if they are equivalent.
|
|
5
|
-
*
|
|
6
|
-
* @since 4.0.0
|
|
7
|
-
* @category Lang
|
|
8
|
-
* @param {*} value The value to compare.
|
|
9
|
-
* @param {*} other The other value to compare.
|
|
10
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
11
|
-
* @example
|
|
12
|
-
*
|
|
13
|
-
* const object = { 'a': 1 }
|
|
14
|
-
* const other = { 'a': 1 }
|
|
15
|
-
*
|
|
16
|
-
* eq(object, object)
|
|
17
|
-
* // => true
|
|
18
|
-
*
|
|
19
|
-
* eq(object, other)
|
|
20
|
-
* // => false
|
|
21
|
-
*
|
|
22
|
-
* eq('a', 'a')
|
|
23
|
-
* // => true
|
|
24
|
-
*
|
|
25
|
-
* eq('a', Object('a'))
|
|
26
|
-
* // => false
|
|
27
|
-
*
|
|
28
|
-
* eq(NaN, NaN)
|
|
29
|
-
* // => true
|
|
30
|
-
*/
|
|
31
|
-
declare function eq(value: any, other: any): boolean;
|
|
32
|
-
export default eq;
|
package/dist/utils/lodash/eq.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performs a
|
|
3
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
4
|
-
* comparison between two values to determine if they are equivalent.
|
|
5
|
-
*
|
|
6
|
-
* @since 4.0.0
|
|
7
|
-
* @category Lang
|
|
8
|
-
* @param {*} value The value to compare.
|
|
9
|
-
* @param {*} other The other value to compare.
|
|
10
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
11
|
-
* @example
|
|
12
|
-
*
|
|
13
|
-
* const object = { 'a': 1 }
|
|
14
|
-
* const other = { 'a': 1 }
|
|
15
|
-
*
|
|
16
|
-
* eq(object, object)
|
|
17
|
-
* // => true
|
|
18
|
-
*
|
|
19
|
-
* eq(object, other)
|
|
20
|
-
* // => false
|
|
21
|
-
*
|
|
22
|
-
* eq('a', 'a')
|
|
23
|
-
* // => true
|
|
24
|
-
*
|
|
25
|
-
* eq('a', Object('a'))
|
|
26
|
-
* // => false
|
|
27
|
-
*
|
|
28
|
-
* eq(NaN, NaN)
|
|
29
|
-
* // => true
|
|
30
|
-
*/
|
|
31
|
-
function eq(value, other) {
|
|
32
|
-
return value === other || (value !== value && other !== other);
|
|
33
|
-
}
|
|
34
|
-
export default eq;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const toString = Object.prototype.toString;
|
|
5
|
-
/**
|
|
6
|
-
* Gets the `toStringTag` of `value`.
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
* @param {*} value The value to query.
|
|
10
|
-
* @returns {string} Returns the `toStringTag`.
|
|
11
|
-
*/
|
|
12
|
-
function getTag(value) {
|
|
13
|
-
if (value == null) {
|
|
14
|
-
return value === undefined ? "[object Undefined]" : "[object Null]";
|
|
15
|
-
}
|
|
16
|
-
return toString.call(value);
|
|
17
|
-
}
|
|
18
|
-
exports.default = getTag;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
const toString = Object.prototype.toString;
|
|
3
|
-
/**
|
|
4
|
-
* Gets the `toStringTag` of `value`.
|
|
5
|
-
*
|
|
6
|
-
* @private
|
|
7
|
-
* @param {*} value The value to query.
|
|
8
|
-
* @returns {string} Returns the `toStringTag`.
|
|
9
|
-
*/
|
|
10
|
-
function getTag(value) {
|
|
11
|
-
if (value == null) {
|
|
12
|
-
return value === undefined ? "[object Undefined]" : "[object Null]";
|
|
13
|
-
}
|
|
14
|
-
return toString.call(value);
|
|
15
|
-
}
|
|
16
|
-
export default getTag;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/** Used as references for various `Number` constants. */
|
|
5
|
-
const MAX_SAFE_INTEGER = 9007199254740991;
|
|
6
|
-
/** Used to detect unsigned integer values. */
|
|
7
|
-
const reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
8
|
-
/**
|
|
9
|
-
* Checks if `value` is a valid array-like index.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
* @param {*} value The value to check.
|
|
13
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
14
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
15
|
-
*/
|
|
16
|
-
function isIndex(value, length) {
|
|
17
|
-
const type = typeof value;
|
|
18
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
19
|
-
return (!!length &&
|
|
20
|
-
(type === "number" || (type !== "symbol" && reIsUint.test(value))) &&
|
|
21
|
-
value > -1 &&
|
|
22
|
-
value % 1 === 0 &&
|
|
23
|
-
value < length);
|
|
24
|
-
}
|
|
25
|
-
exports.default = isIndex;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if `value` is a valid array-like index.
|
|
3
|
-
*
|
|
4
|
-
* @private
|
|
5
|
-
* @param {*} value The value to check.
|
|
6
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
7
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
8
|
-
*/
|
|
9
|
-
declare function isIndex(value: any, length: any): boolean;
|
|
10
|
-
export default isIndex;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/** Used as references for various `Number` constants. */
|
|
3
|
-
const MAX_SAFE_INTEGER = 9007199254740991;
|
|
4
|
-
/** Used to detect unsigned integer values. */
|
|
5
|
-
const reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
6
|
-
/**
|
|
7
|
-
* Checks if `value` is a valid array-like index.
|
|
8
|
-
*
|
|
9
|
-
* @private
|
|
10
|
-
* @param {*} value The value to check.
|
|
11
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
12
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
13
|
-
*/
|
|
14
|
-
function isIndex(value, length) {
|
|
15
|
-
const type = typeof value;
|
|
16
|
-
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
17
|
-
return (!!length &&
|
|
18
|
-
(type === "number" || (type !== "symbol" && reIsUint.test(value))) &&
|
|
19
|
-
value > -1 &&
|
|
20
|
-
value % 1 === 0 &&
|
|
21
|
-
value < length);
|
|
22
|
-
}
|
|
23
|
-
export default isIndex;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// @ts-nocheck
|
|
7
|
-
const isSymbol_js_1 = __importDefault(require("./isSymbol.cjs"));
|
|
8
|
-
/** Used to match property names within property paths. */
|
|
9
|
-
const reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
10
|
-
const reIsPlainProp = /^\w*$/;
|
|
11
|
-
/**
|
|
12
|
-
* Checks if `value` is a property name and not a property path.
|
|
13
|
-
*
|
|
14
|
-
* @private
|
|
15
|
-
* @param {*} value The value to check.
|
|
16
|
-
* @param {Object} [object] The object to query keys on.
|
|
17
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
18
|
-
*/
|
|
19
|
-
function isKey(value, object) {
|
|
20
|
-
if (Array.isArray(value)) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
const type = typeof value;
|
|
24
|
-
if (type === "number" ||
|
|
25
|
-
type === "boolean" ||
|
|
26
|
-
value == null ||
|
|
27
|
-
(0, isSymbol_js_1.default)(value)) {
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
return (reIsPlainProp.test(value) ||
|
|
31
|
-
!reIsDeepProp.test(value) ||
|
|
32
|
-
(object != null && value in Object(object)));
|
|
33
|
-
}
|
|
34
|
-
exports.default = isKey;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if `value` is a property name and not a property path.
|
|
3
|
-
*
|
|
4
|
-
* @private
|
|
5
|
-
* @param {*} value The value to check.
|
|
6
|
-
* @param {Object} [object] The object to query keys on.
|
|
7
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
8
|
-
*/
|
|
9
|
-
declare function isKey(value: any, object: any): boolean;
|
|
10
|
-
export default isKey;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import isSymbol from "./isSymbol.js";
|
|
3
|
-
/** Used to match property names within property paths. */
|
|
4
|
-
const reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
5
|
-
const reIsPlainProp = /^\w*$/;
|
|
6
|
-
/**
|
|
7
|
-
* Checks if `value` is a property name and not a property path.
|
|
8
|
-
*
|
|
9
|
-
* @private
|
|
10
|
-
* @param {*} value The value to check.
|
|
11
|
-
* @param {Object} [object] The object to query keys on.
|
|
12
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
13
|
-
*/
|
|
14
|
-
function isKey(value, object) {
|
|
15
|
-
if (Array.isArray(value)) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
const type = typeof value;
|
|
19
|
-
if (type === "number" ||
|
|
20
|
-
type === "boolean" ||
|
|
21
|
-
value == null ||
|
|
22
|
-
isSymbol(value)) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
return (reIsPlainProp.test(value) ||
|
|
26
|
-
!reIsDeepProp.test(value) ||
|
|
27
|
-
(object != null && value in Object(object)));
|
|
28
|
-
}
|
|
29
|
-
export default isKey;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
/**
|
|
5
|
-
* Checks if `value` is the
|
|
6
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
7
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
8
|
-
*
|
|
9
|
-
* @since 0.1.0
|
|
10
|
-
* @category Lang
|
|
11
|
-
* @param {*} value The value to check.
|
|
12
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
13
|
-
* @example
|
|
14
|
-
*
|
|
15
|
-
* isObject({})
|
|
16
|
-
* // => true
|
|
17
|
-
*
|
|
18
|
-
* isObject([1, 2, 3])
|
|
19
|
-
* // => true
|
|
20
|
-
*
|
|
21
|
-
* isObject(Function)
|
|
22
|
-
* // => true
|
|
23
|
-
*
|
|
24
|
-
* isObject(null)
|
|
25
|
-
* // => false
|
|
26
|
-
*/
|
|
27
|
-
function isObject(value) {
|
|
28
|
-
const type = typeof value;
|
|
29
|
-
return value != null && (type === "object" || type === "function");
|
|
30
|
-
}
|
|
31
|
-
exports.default = isObject;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if `value` is the
|
|
3
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
4
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
5
|
-
*
|
|
6
|
-
* @since 0.1.0
|
|
7
|
-
* @category Lang
|
|
8
|
-
* @param {*} value The value to check.
|
|
9
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
10
|
-
* @example
|
|
11
|
-
*
|
|
12
|
-
* isObject({})
|
|
13
|
-
* // => true
|
|
14
|
-
*
|
|
15
|
-
* isObject([1, 2, 3])
|
|
16
|
-
* // => true
|
|
17
|
-
*
|
|
18
|
-
* isObject(Function)
|
|
19
|
-
* // => true
|
|
20
|
-
*
|
|
21
|
-
* isObject(null)
|
|
22
|
-
* // => false
|
|
23
|
-
*/
|
|
24
|
-
declare function isObject(value: any): boolean;
|
|
25
|
-
export default isObject;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/**
|
|
3
|
-
* Checks if `value` is the
|
|
4
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
5
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
6
|
-
*
|
|
7
|
-
* @since 0.1.0
|
|
8
|
-
* @category Lang
|
|
9
|
-
* @param {*} value The value to check.
|
|
10
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
11
|
-
* @example
|
|
12
|
-
*
|
|
13
|
-
* isObject({})
|
|
14
|
-
* // => true
|
|
15
|
-
*
|
|
16
|
-
* isObject([1, 2, 3])
|
|
17
|
-
* // => true
|
|
18
|
-
*
|
|
19
|
-
* isObject(Function)
|
|
20
|
-
* // => true
|
|
21
|
-
*
|
|
22
|
-
* isObject(null)
|
|
23
|
-
* // => false
|
|
24
|
-
*/
|
|
25
|
-
function isObject(value) {
|
|
26
|
-
const type = typeof value;
|
|
27
|
-
return value != null && (type === "object" || type === "function");
|
|
28
|
-
}
|
|
29
|
-
export default isObject;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const getTag_js_1 = __importDefault(require("./getTag.cjs"));
|
|
8
|
-
/**
|
|
9
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
10
|
-
*
|
|
11
|
-
* @since 4.0.0
|
|
12
|
-
* @category Lang
|
|
13
|
-
* @param {*} value The value to check.
|
|
14
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
15
|
-
* @example
|
|
16
|
-
*
|
|
17
|
-
* isSymbol(Symbol.iterator)
|
|
18
|
-
* // => true
|
|
19
|
-
*
|
|
20
|
-
* isSymbol('abc')
|
|
21
|
-
* // => false
|
|
22
|
-
*/
|
|
23
|
-
function isSymbol(value) {
|
|
24
|
-
const type = typeof value;
|
|
25
|
-
return (type === "symbol" ||
|
|
26
|
-
(type === "object" && value != null && (0, getTag_js_1.default)(value) === "[object Symbol]"));
|
|
27
|
-
}
|
|
28
|
-
exports.default = isSymbol;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
3
|
-
*
|
|
4
|
-
* @since 4.0.0
|
|
5
|
-
* @category Lang
|
|
6
|
-
* @param {*} value The value to check.
|
|
7
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
8
|
-
* @example
|
|
9
|
-
*
|
|
10
|
-
* isSymbol(Symbol.iterator)
|
|
11
|
-
* // => true
|
|
12
|
-
*
|
|
13
|
-
* isSymbol('abc')
|
|
14
|
-
* // => false
|
|
15
|
-
*/
|
|
16
|
-
declare function isSymbol(value: any): boolean;
|
|
17
|
-
export default isSymbol;
|