@monyasau/whatdatatype

1.0.1 • Public • Published

Installation:

npm i @monyasau/whatdatatype

Usage:

yourCode.js:
        const checkDataType = require('whatDataType'); //import the package
        console.log(checkDataType(123)); // returns number
        console.log(checkDataType("Hello world)); // returns string
        console.log(checkDataType(true)); // returns boolean
        console.log(checkDataType(()=>{})); // returns function
        console.log(checkDataType({a:"aa",b:"bb"})); // returns object
        console.log(checkDataType([1,"aaa",true])); // returns array
        console.log(checkDataType()); // returns undefined
    These code will return: number, string, boolean, function, object, array, undefined. respectively

Readme

Keywords

Package Sidebar

Install

npm i @monyasau/whatdatatype

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

4.18 kB

Total Files

4

Last publish

Collaborators

  • monyasau