Types

check your code type and return Booleans

Usage

  1. You can import in your js file es6 (modules,vue,react,...)
import { isString } from 'helping-js/core/types'

console.log(isString('test')) // true
console.log(isString(true)) // false
  1. You can import in your js file es5 (nodejs)
var { isString } = require('helping-js/core/types')

console.log(isString('test')) // true
console.log(isString(true)) // false
  1. You can usage from CDN (only modules)
import { isString } from 'https://unpkg.com/browse/helping-js/core/types.js'

console.log(isString('test')) // true
console.log(isString(true)) // false

Options

FunctionsDescription
toTypeGet Type of Value
toRawTypeEnsure all props option syntax are normalized into the Object-based format.
toRawTypeLCLowerCase toRawType() function
isUndefinedCheck Undefined Type
isNullCheck Null Type
isEmptyStringCheck EmptyString
isUndefinedOrNullCheck UndefinedOrNull Type
isUndefinedOrNullOrEmptyCheck UndefinedOrNullOrEmpty Type
isFunctionCheck Fcuntion Type
isBooleanCheck Boolean Type
isStringCheck String Type
isNumberCheck Number Type
isNumericCheck Numeric
isPrimitiveCheck primitive
isArrayCheck Array type
isObjectCheck Object type
isPlainObjectCheck PlainObject type ([object Object])
isDateCheck Date
isEventCheck Event
isFileCheck File
isRegExpCheck RegExp
isPromiseCheck Promise
Last Updated:
Contributors: parsa jiravand