0.4.6 • Published 2 years ago

@elzup/kindof v0.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

kindof npm.io

advanced typeof for 10 type

10 type from JSON Data Type and typeof.

JSON: 6 type string | number | object | array | boolean | null typeof: 8 type undefined | boolean | number | bigint | string | symbol | function | object

example vlauekeytypeofJSONdescription
undefined"undefined"o
true"boolean"oo
123"number"oo
1000n"bigint"oES2020
"hello""string"oo
Symbol('s')"symbol"oES2015
() => 0"function"o
{ a: 1 }"object"oo
[1, 2, 3]"array"otypoef => "object"
null"null"otypoef => "object"

Install

$ npm install @elzup/kindof

Usage

const { kindof } = require('@elzup/kindof')

kindof(123)
//=> 'number'

kindof([1, 2])
//=> 'array'

kindof(null)
//=> 'null'

MIT © anozon

0.4.6

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago