0.1.0 • Published 2 years ago

type-coversion v0.1.0

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

Data types in javascript

Data typeExampleData typeExample
string"Hello World"number42
nullnullundefinedundefined
booleantruesymbolSymbol(42)
object{a: 1, b: 2}array[1, 2, 3]
BigIntBigInt(42)mapnew Map([[1, 2], [2, 3]])datenew Date()RegExp/^\d+$/
setnew Set([1, 2, 3])Weakmapnew WeakMap()
Weaksetnew WeakSet([1, 2, 3])

Methods

tostr()

Converts the given input to a string datatype. | Supported types | Not supported types | | ---------------- | -------------------- | | string | undefined| | number | WeakMap | | boolean | WeakSet | | null | |symbol| | object| | array| | BigInt| | map| | set| |regex|