2.0.1 • Published 2 years ago

to-type-string v2.0.1

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

to-type-string

Build Status npm version Node.js Version

Get type description of a JavaScript variable

Installation

npm install to-type-string

Usage

import toTypeString from 'to-type-string';

class MyClass {}

toTypeString(null); // null
toTypeString(undefined); // undefined
toTypeString(new MyClass()); // MyClass
toTypeString([1, 3, 2]); // Array
toTypeString(() => 'haha'); // function
toTypeString(/abc/); // RegExp
toTypeString(NaN); // number
toTypeString(new Uint16Array(10)); // Uint16Array
toTypeString(new Date()); // Date
toTypeString(new Object()); // Object
2.0.1

2 years ago

2.0.0

3 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago