@cc-heart/utils
Version:
🔧 javascript common tools collection
2,465 lines • 66.7 kB
JSON
{
"id": 0,
"name": "@cc-heart/utils",
"variant": "project",
"kind": 1,
"flags": {},
"children": [
{
"id": 42,
"name": "_toString",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 1,
"character": 13,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L1"
}
],
"signatures": [
{
"id": 43,
"name": "_toString",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Returns a string representation of an object."
}
]
},
"sources": [
{
"fileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"line": 127,
"character": 4
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
},
{
"id": 64,
"name": "capitalize",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/string.ts",
"line": 7,
"character": 13,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/string.ts#L7"
}
],
"signatures": [
{
"id": 65,
"name": "capitalize",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Capitalizes the first letter of a string."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "- The capitalized string."
}
]
}
]
},
"sources": [
{
"fileName": "lib/string.ts",
"line": 7,
"character": 26,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/string.ts#L7"
}
],
"typeParameter": [
{
"id": 66,
"name": "T",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"parameters": [
{
"id": 67,
"name": "target",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The string to be capitalized."
}
]
},
"type": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
],
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Capitalize"
},
"typeArguments": [
{
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
],
"name": "Capitalize",
"package": "typescript"
}
}
]
},
{
"id": 48,
"name": "convertParamsRouterToRegExp",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/url.ts",
"line": 27,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/url.ts#L27"
}
],
"signatures": [
{
"id": 49,
"name": "convertParamsRouterToRegExp",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "convert params routes to regular expressions"
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "null or An array contains the RegExp that matches the params and the path for each params parameter"
}
]
}
]
},
"sources": [
{
"fileName": "lib/url.ts",
"line": 27,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/url.ts#L27"
}
],
"parameters": [
{
"id": 50,
"name": "path",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "a params paths"
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "union",
"types": [
{
"type": "literal",
"value": null
},
{
"type": "array",
"elementType": {
"type": "union",
"types": [
{
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "RegExp"
},
"name": "RegExp",
"package": "typescript"
},
{
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
]
}
}
]
}
}
]
},
{
"id": 44,
"name": "convertQueryString",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/url.ts",
"line": 7,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/url.ts#L7"
}
],
"signatures": [
{
"id": 45,
"name": "convertQueryString",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "convert query string to object"
}
],
"blockTags": [
{
"tag": "@returns",
"content": []
}
]
},
"sources": [
{
"fileName": "lib/url.ts",
"line": 7,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/url.ts#L7"
}
],
"typeParameter": [
{
"id": 46,
"name": "T",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Record"
},
"typeArguments": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "string"
}
],
"name": "Record",
"package": "typescript"
}
}
],
"parameters": [
{
"id": 47,
"name": "url",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "http url"
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
]
},
{
"id": 72,
"name": "diffCollection",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "integrations/antd/table/checkboxSelect.ts",
"line": 7,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/integrations/antd/table/checkboxSelect.ts#L7"
}
],
"signatures": [
{
"id": 73,
"name": "diffCollection",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [],
"blockTags": [
{
"tag": "@description",
"content": [
{
"kind": "text",
"text": "Returns the difference between two arrays of primitive values."
}
]
},
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "- An array containing elements that are present in one array but not the other."
}
]
}
]
},
"sources": [
{
"fileName": "integrations/antd/table/checkboxSelect.ts",
"line": 7,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/integrations/antd/table/checkboxSelect.ts#L7"
}
],
"typeParameter": [
{
"id": 74,
"name": "T",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "PropertyKey"
},
"name": "PropertyKey",
"package": "typescript"
}
}
],
"parameters": [
{
"id": 75,
"name": "a",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The first array to compare."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
},
{
"id": 76,
"name": "b",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The second array to compare."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
}
]
},
{
"id": 38,
"name": "hasOwn",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 146,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L146"
}
],
"signatures": [
{
"id": 39,
"name": "hasOwn",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given object has its own property."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the object has its own property, otherwise false."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 146,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L146"
}
],
"parameters": [
{
"id": 40,
"name": "obj",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The object to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 41,
"name": "prop",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The property to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
]
},
{
"id": 34,
"name": "isArrayEquals",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 125,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L125"
}
],
"signatures": [
{
"id": 35,
"name": "isArrayEquals",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if two arrays are equal."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the arrays are equal, otherwise false."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 125,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L125"
}
],
"parameters": [
{
"id": 36,
"name": "firstArr",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The first array to compare."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "unknown"
}
}
},
{
"id": 37,
"name": "secondArr",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The second array to compare."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "unknown"
}
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
]
},
{
"id": 10,
"name": "isBool",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 39,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L39"
}
],
"signatures": [
{
"id": 11,
"name": "isBool",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the provided value is a boolean."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is a boolean, false otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 39,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L39"
}
],
"parameters": [
{
"id": 12,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "boolean"
}
}
}
]
},
{
"id": 28,
"name": "isEffectiveNumber",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 98,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L98"
}
],
"signatures": [
{
"id": 29,
"name": "isEffectiveNumber",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "determines if it is a valid value other than NaN"
}
],
"blockTags": [
{
"tag": "@returns",
"content": []
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 98,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L98"
}
],
"parameters": [
{
"id": 30,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "number"
}
}
}
]
},
{
"id": 22,
"name": "isFalsy",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 79,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L79"
}
],
"signatures": [
{
"id": 23,
"name": "isFalsy",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if a value is falsy."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is falsy, otherwise false."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 79,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L79"
}
],
"parameters": [
{
"id": 24,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "literal",
"value": false
}
}
}
]
},
{
"id": 4,
"name": "isFn",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 19,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L19"
}
],
"signatures": [
{
"id": 5,
"name": "isFn",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given value is a function."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is a function, false otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 19,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L19"
}
],
"parameters": [
{
"id": 6,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to be checked."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Function"
},
"name": "Function",
"package": "typescript"
}
}
}
]
},
{
"id": 16,
"name": "isNull",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 59,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L59"
}
],
"signatures": [
{
"id": 17,
"name": "isNull",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given value is null."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is null, false otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 59,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L59"
}
],
"parameters": [
{
"id": 18,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "literal",
"value": null
}
}
}
]
},
{
"id": 25,
"name": "isNumber",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 89,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L89"
}
],
"signatures": [
{
"id": 26,
"name": "isNumber",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given value is a number."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is a number, false otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 89,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L89"
}
],
"parameters": [
{
"id": 27,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to be checked."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "number"
}
}
}
]
},
{
"id": 1,
"name": "isObject",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 9,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L9"
}
],
"signatures": [
{
"id": 2,
"name": "isObject",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given value is an object."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is an object, otherwise false."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 9,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L9"
}
],
"parameters": [
{
"id": 3,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to be checked."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "object"
}
}
}
]
},
{
"id": 19,
"name": "isPrimitive",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 69,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L69"
}
],
"signatures": [
{
"id": 20,
"name": "isPrimitive",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Determines whether a value is a primitive."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns "
},
{
"kind": "code",
"text": "`true`"
},
{
"kind": "text",
"text": " if the value is a primitive, "
},
{
"kind": "code",
"text": "`false`"
},
{
"kind": "text",
"text": " otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 69,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L69"
}
],
"parameters": [
{
"id": 21,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "intrinsic",
"name": "boolean"
}
}
]
},
{
"id": 31,
"name": "isPromise",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 109,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L109"
}
],
"signatures": [
{
"id": 32,
"name": "isPromise",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if a value is a Promise."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns "
},
{
"kind": "code",
"text": "`true`"
},
{
"kind": "text",
"text": " if the value is a Promise, else "
},
{
"kind": "code",
"text": "`false`"
},
{
"kind": "text",
"text": "."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 109,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L109"
}
],
"parameters": [
{
"id": 33,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Promise"
},
"typeArguments": [
{
"type": "intrinsic",
"name": "unknown"
}
],
"name": "Promise",
"package": "typescript"
}
}
}
]
},
{
"id": 7,
"name": "isStr",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 29,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L29"
}
],
"signatures": [
{
"id": 8,
"name": "isStr",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if the given value is a string."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is a string, false otherwise."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 29,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L29"
}
],
"parameters": [
{
"id": 9,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to be checked."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "string"
}
}
}
]
},
{
"id": 13,
"name": "isUndef",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 49,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L49"
}
],
"signatures": [
{
"id": 14,
"name": "isUndef",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Checks if a value is undefined."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "Returns true if the value is undefined, otherwise false."
}
]
}
]
},
"sources": [
{
"fileName": "lib/validate.ts",
"line": 49,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/validate.ts#L49"
}
],
"parameters": [
{
"id": 15,
"name": "val",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The value to check."
}
]
},
"type": {
"type": "intrinsic",
"name": "unknown"
}
}
],
"type": {
"type": "predicate",
"name": "val",
"asserts": false,
"targetType": {
"type": "intrinsic",
"name": "undefined"
}
}
}
]
},
{
"id": 54,
"name": "mulSplit",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 16,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L16"
}
],
"signatures": [
{
"id": 55,
"name": "mulSplit",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [],
"blockTags": [
{
"tag": "@description",
"content": [
{
"kind": "text",
"text": "Add the number of cuts based on the original split and return all subsets after the cut"
}
]
},
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "a new split array, length is num + 1"
}
]
}
]
},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 16,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L16"
}
],
"parameters": [
{
"id": 56,
"name": "str",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "need to split of primitive string"
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 57,
"name": "splitStr",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "split params"
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
},
{
"id": 58,
"name": "num",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "split limit"
}
]
},
"type": {
"type": "intrinsic",
"name": "number"
},
"defaultValue": "-1"
}
],
"type": {
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "string"
}
}
}
]
},
{
"id": 77,
"name": "multipleSelectFilter",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "integrations/antd/table/checkboxSelect.ts",
"line": 27,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/integrations/antd/table/checkboxSelect.ts#L27"
}
],
"signatures": [
{
"id": 78,
"name": "multipleSelectFilter",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [],
"blockTags": [
{
"tag": "@description",
"content": [
{
"kind": "text",
"text": "This function calculates the difference between two collections of items and returns the updated collection based on the difference."
}
]
},
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "the updated collection of objects based on the difference between the two collections of keys."
}
]
}
]
},
"sources": [
{
"fileName": "integrations/antd/table/checkboxSelect.ts",
"line": 27,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/integrations/antd/table/checkboxSelect.ts#L27"
}
],
"typeParameter": [
{
"id": 79,
"name": "T",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the type of the keys in the collections."
}
]
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "number"
}
]
}
},
{
"id": 80,
"name": "U",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the type of the objects in the collections."
}
]
},
"type": {
"type": "intrinsic",
"name": "object"
}
},
{
"id": 81,
"name": "K",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the type of the key to be used to compare objects in the collections."
}
]
},
"type": {
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "string"
},
{
"type": "intrinsic",
"name": "number"
},
{
"type": "intrinsic",
"name": "symbol"
}
]
}
}
],
"parameters": [
{
"id": 82,
"name": "oldSelectKeys",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the original collection of keys."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
},
{
"id": 83,
"name": "newSelectKeys",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the new collection of keys."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
},
{
"id": 84,
"name": "oldSelected",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the original collection of objects."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "U",
"refersToTypeParameter": true
}
}
},
{
"id": 85,
"name": "newSelected",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the new collection of objects."
}
]
},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "U",
"refersToTypeParameter": true
}
}
},
{
"id": 86,
"name": "key",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "the key to be used to compare objects in the collections."
}
]
},
"type": {
"type": "reference",
"target": -1,
"name": "K",
"refersToTypeParameter": true
}
}
],
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": -1,
"name": "U",
"refersToTypeParameter": true
}
}
}
]
},
{
"id": 59,
"name": "noop",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 6,
"character": 13,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L6"
}
],
"signatures": [
{
"id": 60,
"name": "noop",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "This function does nothing."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "No return value."
}
]
}
]
},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 6,
"character": 20,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L6"
}
],
"type": {
"type": "intrinsic",
"name": "void"
}
}
]
},
{
"id": 61,
"name": "sleep",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 32,
"character": 13,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L32"
}
],
"signatures": [
{
"id": 62,
"name": "sleep",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Sleeps for a given delay."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "A promise that resolves after the delay."
}
]
}
]
},
"sources": [
{
"fileName": "lib/shard.ts",
"line": 32,
"character": 21,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/shard.ts#L32"
}
],
"parameters": [
{
"id": 63,
"name": "delay",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The delay, in milliseconds."
}
]
},
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Promise"
},
"typeArguments": [
{
"type": "intrinsic",
"name": "unknown"
}
],
"name": "Promise",
"package": "typescript"
}
}
]
},
{
"id": 68,
"name": "unCapitalize",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/string.ts",
"line": 16,
"character": 13,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/string.ts#L16"
}
],
"signatures": [
{
"id": 69,
"name": "unCapitalize",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Returns a new string with the first character converted to lowercase."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "- The unCapitalized string."
}
]
}
]
},
"sources": [
{
"fileName": "lib/string.ts",
"line": 16,
"character": 28,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/string.ts#L16"
}
],
"typeParameter": [
{
"id": 70,
"name": "T",
"variant": "typeParam",
"kind": 131072,
"flags": {},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"parameters": [
{
"id": 71,
"name": "target",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The string to be unCapitalized."
}
]
},
"type": {
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
}
],
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Uncapitalize"
},
"typeArguments": [
{
"type": "reference",
"target": -1,
"name": "T",
"refersToTypeParameter": true
}
],
"name": "Uncapitalize",
"package": "typescript"
}
}
]
},
{
"id": 51,
"name": "underlineToHump",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "lib/underlineToHump.ts",
"line": 8,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/underlineToHump.ts#L8"
}
],
"signatures": [
{
"id": 52,
"name": "underlineToHump",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Converts an underline-separated string to camel case.\ne.g. underlineToHump('hello_word') => 'helloWord'"
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "The camel case version of the input string."
}
]
}
]
},
"sources": [
{
"fileName": "lib/underlineToHump.ts",
"line": 8,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/lib/underlineToHump.ts#L8"
}
],
"parameters": [
{
"id": 53,
"name": "target",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "The underline-separated string to convert."
}
]
},
"type": {
"type": "intrinsic",
"name": "string"
}
}
],
"type": {
"type": "intrinsic",
"name": "string"
}
}
]
},
{
"id": 94,
"name": "useConcurrency",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "hooks/useConcurrency.ts",
"line": 4,
"character": 15,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/hooks/useConcurrency.ts#L4"
}
],
"signatures": [
{
"id": 95,
"name": "useConcurrency",
"variant": "signature",
"kind": 4096,
"flags": {},
"sources": [
{
"fileName": "hooks/useConcurrency.ts",
"line": 4,
"character": 15,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/hooks/useConcurrency.ts#L4"
}
],
"parameters": [
{
"id": 96,
"name": "tasks",
"variant": "param",
"kind": 32768,
"flags": {},
"type": {
"type": "array",
"elementType": {
"type": "reference",
"target": {
"sourceFileName": "typings/helper.ts",
"qualifiedName": "fn"
},
"name": "fn",
"package": "@cc-heart/utils"
}
}
},
{
"id": 97,
"name": "maxConcurrency",
"variant": "param",
"kind": 32768,
"flags": {},
"type": {
"type": "intrinsic",
"name": "number"
}
}
],
"type": {
"type": "reference",
"target": {
"sourceFileName": "node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts",
"qualifiedName": "Promise"
},
"typeArguments": [
{
"type": "union",
"types": [
{
"type": "intrinsic",
"name": "undefined"
},
{
"type": "array",
"elementType": {
"type": "intrinsic",
"name": "any"
}
}
]
}
],
"name": "Promise",
"package": "typescript"
}
}
]
},
{
"id": 87,
"name": "useDebounce",
"variant": "declaration",
"kind": 64,
"flags": {},
"sources": [
{
"fileName": "hooks/useDebounce.ts",
"line": 11,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/hooks/useDebounce.ts#L11"
}
],
"signatures": [
{
"id": 88,
"name": "useDebounce",
"variant": "signature",
"kind": 4096,
"flags": {},
"comment": {
"summary": [
{
"kind": "text",
"text": "Returns a debounced version of the provided function that delays its\nexecution until a certain amount of time has passed since the last time it was called."
}
],
"blockTags": [
{
"tag": "@returns",
"content": [
{
"kind": "text",
"text": "- The debounced version of the provided function."
}
]
}
]
},
"sources": [
{
"fileName": "hooks/useDebounce.ts",
"line": 11,
"character": 16,
"url": "https://github.com/cc-hearts/utils/blob/47b14e9/hooks/useDebounce.ts#L11"
}
],
"parameters": [
{
"id": 89,
"name": "fn",
"variant": "param",
"kind": 32768,
"flags": {},
"comment": {
"summary": [