Skip to content
/ TypeJS Public

TypeJS is lightweight library its give to developer additional functionality for a manipulation (check, validate and using) JavaScript data types.

License

Notifications You must be signed in to change notification settings

Hamik25/TypeJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

TypeJS

TypeJS is lightweight library its give to developer additional functionality for a manipulation (check, validate and using) JavaScript data types. Library support both (AMD, CommonJS)

Docs

Version

npm version GitHub version

Install

CDN

<script type="text/javascript" src="https://cdn.rawgit.com/Hamik25/TypeJS/master/dist/bundle.js"></script>

NPM

$ npm install js-type-helper

Yarn

$ yarn add js-type-helper

Code Examples

const str = 'some text';
TypeJS.getType(str) // String

const intNum = 5;
TypeJS.getType(intNum) // Int

const floatNum = 8.469;
TypeJS.getType(floatNum) // Float

const infNum = 8 / 0;
TypeJS.getType(infNum) // Infinity

const negInfNum = -2 / 0;
TypeJS.getType(negInfNum) // -Infinity

const nanNum = 80 / 'some text';
TypeJS.getType(nanNum) // NaN

const obj = {};
TypeJS.getType(obj) // Object

const nul = null;
TypeJS.getType(nul) // Null

const unDef;
TypeJS.getType(unDef) // Undefined

const bool = true;
TypeJS.getType(bool) // Boolean

const arr = [0, 1, 2];
TypeJS.getType(str) // Array

const foo = function() {};
TypeJS.getType(str) // Function

const date = new Date();
TypeJS.getType(str) // Date

License

MIT

About

TypeJS is lightweight library its give to developer additional functionality for a manipulation (check, validate and using) JavaScript data types.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published