@vyron/just-test
Advanced tools
+8
-1
| { | ||
| "name": "@vyron/just-test", | ||
| "version": "1.1.2", | ||
| "version": "1.1.4", | ||
| "description": "", | ||
@@ -13,2 +13,9 @@ "main": "index.js", | ||
| ], | ||
| "files": [ | ||
| "index.js", | ||
| "LICENSE", | ||
| "dist", | ||
| "package.json", | ||
| "README.md" | ||
| ], | ||
| "author": "vyron", | ||
@@ -15,0 +22,0 @@ "license": "MIT", |
| { | ||
| "extends": "../../api-extractor.json", | ||
| "mainEntryPointFilePath": "./dist/packages/<unscopedPackageName>/src/index.d.ts", | ||
| "dtsRollup": { | ||
| "publicTrimmedFilePath": "./dist/<unscopedPackageName>.d.ts" | ||
| } | ||
| } |
-43
| /* | ||
| * @Author: vyron | ||
| * @Date: 2022-01-10 17:38:09 | ||
| * @LastEditTime: 2022-02-27 21:55:51 | ||
| * @LastEditors: vyron | ||
| * @Description: 判断数据类型 | ||
| * @FilePath: /v-utils/packages/type/src/index.ts | ||
| */ | ||
| // return value like "[object String]" | ||
| export const toTypeString = (value: unknown): string => | ||
| Object.prototype.toString.call(value) | ||
| // return value line String | Boolean | Number | Array | Object | Function | RegExp | Date | ||
| export const toRawType = (value: unknown): string => | ||
| toTypeString(value).slice(8, -1) | ||
| // 是否为 Array | ||
| export const isArray = Array.isArray | ||
| // 是否为 Map | ||
| export const isMap = (value: unknown): value is Map<any, any> => | ||
| toRawType(value) === 'Map' | ||
| // 是否为 WeakMap | ||
| export const isWeakMap = (value: unknown): value is WeakMap<object, any> => | ||
| toRawType(value) === 'WeakMap' | ||
| // 是否为 Set | ||
| export const isSet = (value: unknown): value is Set<any> => | ||
| toRawType(value) === 'Set' | ||
| // 是否为 WeakSet | ||
| export const isWeakSet = (value: unknown): value is WeakSet<object> => | ||
| toRawType(value) === 'WeakSet' | ||
| // 是否为 Object | ||
| export const isObject = (value: unknown): value is object => | ||
| typeof value === 'object' && value !== null | ||
| // 是否为字符串 | ||
| export const isString = (value: unknown): value is string => | ||
| typeof value === 'string' |
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
7403
-16.09%9
-18.18%147
-21.39%