existjs
v2.1.0 ( last update: 20 mar 2018 )
Does the variable exist and what is its type? The easy way to know. Typescript included.
Install
npm
npm install existjs --save
Node.js
const exist or ... = ;
Typescript
;
Browser
<script src='/node_modules/existjs/dist/existjs-min.js'></script><script> // How to use: // existjs.exist(); // existjs.or(); // ...</script>
exist()
Does the variable exist?
; // false; // false; // false; // true; // true; // true; // true; // true; // true
or()
It chooses first existing variable
var c = ; // c = 72var c = ; // c = 0
Check types
; // true; // true; // true; // true; // true; // true