fctype
v1.1.3
Published
## VIEW SAMPLES/EXAMPLES HERE
Downloads
15
Readme
fctype
VIEW SAMPLES/EXAMPLES HERE
https://fctype.surge.sh/ or play with it here https://codesandbox.io/s/fctype-example-48t5l
A super-simple <1KB is checking module for JavaScript that returns a Boolean
for each is check.
fctype.is(true); // Boolean
fctype.isArray([]); // true
fctype.isObject({}); // true
fctype.isString(""); // true
fctype.isDate(new Date()); // true
fctype.isRegExp(/test/i); // true
fctype.isFunction(function() {}); // true
fctype.isBoolean(true); // true
fctype.isNumber(1); // true
fctype.isNull(null); // true
fctype.isUndefined(); // true
Installing with npm
npm install fctype
# OR
yarn add fctype
Manual installation
Ensure you're using the files from the dist
directory (contains compiled production-ready code). Ensure you place the script before the closing </body>
tag.
<body>
<!-- html above -->
<script src="dist/fctype.js"></script>
<script>
// fctype module available
</script>
</body>