-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7d37d1
commit 541f818
Showing
95 changed files
with
1,064 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"compilerOptions": { | ||
"declaration": true, | ||
// 生成 .d.ts 文件 | ||
"emitDeclarationOnly": true, | ||
// 只生成声明文件而不生成 JavaScript 文件 | ||
"outDir": "./types", | ||
// 声明文件输出目录,可以根据需要更改 | ||
"allowJs": true, | ||
// 允许编译 .js 文件 | ||
"rootDir": "./" | ||
// 源文件目录,可以根据需要更改 | ||
}, | ||
"include": [ | ||
// 包含的文件范围,根据项目实际路径修改 | ||
"./index.js", | ||
"./is.js", | ||
"./isAlpha.js", | ||
"./isArray.js", | ||
"./isArrayLike.js", | ||
"./isArrayLikeObject.js", | ||
"./isArguments.js", | ||
"./isArrayBuffer.js", | ||
"./isInt8Array.js", | ||
"./isUint8Array.js", | ||
"./isUint8ClampedArray.js", | ||
"./isInt16Array.js", | ||
"./isUint16Array.js", | ||
"./isInt32Array.js", | ||
"./isUint32Array.js", | ||
"./isFloat32Array.js", | ||
"./isFloat64Array.js", | ||
"./isBigInt64Array.js", | ||
"./isBigUint64Array.js", | ||
"./isBigInt.js", | ||
"./isBase64.js", | ||
"./isBinary.js", | ||
"./isBlank.js", | ||
"./isBoolean.js", | ||
"./isBuffer.js", | ||
"./isConstructor.js", | ||
"./isDataView.js", | ||
"./isDate.js", | ||
"./isDOM.js", | ||
"./isElement.js", | ||
"./isEmail.js", | ||
"./isEmpty.js", | ||
"./isEmptyArray.js", | ||
"./isEmptyObject.js", | ||
"./isError.js", | ||
"./isEven.js", | ||
"./isFloat.js", | ||
"./isFragment.js", | ||
"./isFunction.js", | ||
"./isGuid.js", | ||
"./isHash.js", | ||
"./isHex.js", | ||
"./isHTML.js", | ||
"./isHTMLCollection.js", | ||
"./isInfinite.js", | ||
"./isInteger.js", | ||
"./isIPAddress.js", | ||
"./isJSON.js", | ||
"./isLength.js", | ||
"./isMap.js", | ||
"./isNativeFunction.js", | ||
"./isNull.js", | ||
"./isNumber.js", | ||
"./isNumeric.js", | ||
"./isObject.js", | ||
"./isObjectLike.js", | ||
"./isOdd.js", | ||
"./isChinese.js", | ||
"./isPhoneNumber.js", | ||
"./isPlainObject.js", | ||
"./isPrime.js", | ||
"./isPromise.js", | ||
"./isPrototype.js", | ||
"./isRegExp.js", | ||
"./isSet.js", | ||
"./isString.js", | ||
"./isSVG.js", | ||
"./isSymbol.js", | ||
"./isTextNode.js", | ||
"./isTime.js", | ||
"./isTypedArray.js", | ||
"./isUndefined.js", | ||
"./isURL.js", | ||
"./isUUID.js", | ||
"./isValue.js", | ||
"./isVNode.js", | ||
"./isWeakMap.js", | ||
"./isWeakSet.js", | ||
"./isXML.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default _getExactTypeOfNumber; | ||
/** | ||
* (私有方法)获取确切的数值类型 | ||
* ======================================================================== | ||
* @method _getExactTypeOfNumber | ||
* @private | ||
* @param {Number} val - 要检测的数值 | ||
* @returns {String} - 返回数值类型:integer、float、infinite | ||
*/ | ||
declare function _getExactTypeOfNumber(val: number): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default _getExactTypeOfObject; | ||
/** | ||
* (私有方法)获取确切的对象类型 | ||
* ======================================================================== | ||
* @method _getExactTypeOfString | ||
* @private | ||
* @param {String} val - 要检测的字符串 | ||
* @returns {String} 返回对象类型:prototype、vnode、xml | ||
*/ | ||
declare function _getExactTypeOfObject(val: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default _getExactTypeOfString; | ||
/** | ||
* (私有方法)获取确切的字符串类型 | ||
* ======================================================================== | ||
* @method _getExactTypeOfString | ||
* @private | ||
* @param {String} val - 要检测的字符串 | ||
* @returns {String} 返回字符串类型:blank、chinese、email、empty... 等等 | ||
*/ | ||
declare function _getExactTypeOfString(val: string): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default _getTypes; | ||
declare function _getTypes(METHODS: any): (val: any) => {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default _getURLPattern; | ||
declare function _getURLPattern(): RegExp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default _isDate; | ||
/** | ||
* 检测测试数据是否为有效的日期(字符串) | ||
* ======================================================================== | ||
* @method _isDate | ||
* @private | ||
* @param {String} str - 待检测数据(字符串) | ||
* @returns {Boolean} | ||
*/ | ||
declare function _isDate(str: string): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default _isTime; | ||
/** | ||
* 检测测试数据是否为有效的时间(字符串) | ||
* ======================================================================== | ||
* @method _isTime | ||
* @private | ||
* @param {String} str - 待检测数据(字符串) | ||
* @returns {Boolean} | ||
*/ | ||
declare function _isTime(str: string): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default _type; | ||
/** | ||
* 检测数据类型,返回检测数据类型的字符串 | ||
* ======================================================================== | ||
* @method _type | ||
* @param {*} val - 要检测的任意值 | ||
* @returns {String} | ||
*/ | ||
declare function _type(val: any): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export default OBJECTS; | ||
declare const OBJECTS: { | ||
'[object Null]': string; | ||
'[object Set]': string; | ||
'[object WeakSet]': string; | ||
'[object Map]': string; | ||
'[object WeakMap]': string; | ||
'[object Array]': string; | ||
'[object Arguments]': string; | ||
'[object DataView]': string; | ||
'[object ArrayBuffer]': string; | ||
'[object Int8Array]': string; | ||
'[object Uint8Array]': string; | ||
'[object Uint8ClampedArray]': string; | ||
'[object Int16Array]': string; | ||
'[object Uint16Array]': string; | ||
'[object Int32Array]': string; | ||
'[object Uint32Array]': string; | ||
'[object Float32Array]': string; | ||
'[object Float64Array]': string; | ||
'[object BigInt64Array]': string; | ||
'[object BigUint64Array]': string; | ||
'[object Object]': string; | ||
'[object Boolean]': string; | ||
'[object String]': string; | ||
'[object Number]': string; | ||
'[object Date]': string; | ||
'[object Error]': string; | ||
'[object DocumentFragment]': string; | ||
'[object Function]': string; | ||
'[object NodeList]': string; | ||
'[object Promise]': string; | ||
'[object RegExp]': string; | ||
'[object Text]': string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default TAGS; | ||
declare const TAGS: string[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export default TYPES; | ||
declare namespace TYPES { | ||
let BIG_INT: string; | ||
let BOOLEAN: string; | ||
let NULL: string; | ||
let NUMBER: string; | ||
let UNDEFINED: string; | ||
let STRING: string; | ||
let SYMBOL: string; | ||
let SET: string; | ||
let WEAK_SET: string; | ||
let MAP: string; | ||
let WEAK_MAP: string; | ||
let ARRAY: string; | ||
let ARGUMENTS: string; | ||
let DATA_VIEW: string; | ||
let ARRAY_BUFFER: string; | ||
let INT8_ARRAY: string; | ||
let UNIT8_ARRAY: string; | ||
let UNIT8_CLAMPED_ARRAY: string; | ||
let INT16_ARRAY: string; | ||
let UNIT16_ARRAY: string; | ||
let INT32_ARRAY: string; | ||
let UNIT32_ARRAY: string; | ||
let FLOAT32_ARRAY: string; | ||
let FLOAT64_ARRAY: string; | ||
let BIG_INT64_ARRAY: string; | ||
let BIG_UINT64_ARRAY: string; | ||
let OBJECT: string; | ||
let COLLECTION: string; | ||
let DATE: string; | ||
let ELEMENT: string; | ||
let ERROR: string; | ||
let FRAGMENT: string; | ||
let FUNCTION: string; | ||
let PROMISE: string; | ||
let REGEXP: string; | ||
let TEXT: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default hasOwn; | ||
/** | ||
* 检测对象自身属性中是否具有指定的属性。 | ||
* ======================================================================== | ||
* @method hasOwn | ||
* @param {Object} obj - (必须)检测的目标对象 | ||
* @param {String} prop - (必须)属性名 | ||
* @returns {Boolean} | ||
*/ | ||
declare function hasOwn(obj: any, prop: string): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export default Types; | ||
declare const Types: (val: any) => {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default is; | ||
/** | ||
* 检测数据类型,返回检测数据类型的字符串 | ||
* ======================================================================== | ||
* @method is | ||
* @category Lang | ||
* @see _type | ||
* @param {*} val - 要检测的任意值 | ||
* @returns {String} 返回确切的数据类型名称 | ||
*/ | ||
declare function is(val: any): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default isAlpha; | ||
/** | ||
* 检测测试数据是否仅包含英文字符 | ||
* ======================================================================== | ||
* @method isAlpha | ||
* @since 2.1.0 | ||
* @param {String} str - 要检测的数据 | ||
* @returns {Boolean} 'str' 仅包含英文字符,返回 true,否则返回 false | ||
*/ | ||
declare function isAlpha(str: string): boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default isArguments; | ||
/** | ||
* 检测测试数据是否为 arguments 对象 | ||
* ======================================================================== | ||
* @method isArguments | ||
* @param {*} val - 要检测的数据 | ||
* @return {Boolean} ‘val’ 是 Arguments 对象,返回 true,否则返回 false; | ||
*/ | ||
declare function isArguments(val: any): boolean; |
Oops, something went wrong.