1 месяц назад
История
README.md
Detect & check variable type
Include
package.json
:
"dependencies": {
"@jzucen/types-js": "git+https://gitflic.ru/project/jzucen/types-js.git"
}
Import
import { types } from '@jzucen/types-js';
const someVar = 'test value';
console.log(types.boolean); // output: "boolean"
console.log(types.get(12)); // output: "number"
console.log(types.isNull(someVar)); // output: false
Constants & methods
Constant/method |
---|
String undefined = "undefined" |
String function = "function" |
String boolean = "boolean" |
String string = "string" |
String number = "number" |
String object = "object" |
String array = "array" |
String null = "null" |
String nan = "nan" |
String get (Mixed value) |
Boolean is (Mixed value, String type) |
Boolean isUndefined (Mixed value) |
Boolean isFunction (Mixed value) |
Boolean isBoolean (Mixed value) |
Boolean isString (Mixed value) |
Boolean isNumber (Mixed value) |
Boolean isObject (Mixed value) |
Boolean isArray (Mixed value) |
Boolean isNull (Mixed value) |
Boolean isNaN (Mixed value) |
Описание
Detect & check variable type
Конвейеры
0 успешных
0 с ошибкой