Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taufik-nurrohman/is
Conditional utility.
https://github.com/taufik-nurrohman/is
helper node utility
Last synced: 17 days ago
JSON representation
Conditional utility.
- Host: GitHub
- URL: https://github.com/taufik-nurrohman/is
- Owner: taufik-nurrohman
- License: mit
- Created: 2020-11-16T23:21:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-01T12:50:11.000Z (over 2 years ago)
- Last Synced: 2024-05-02T00:23:26.903Z (6 months ago)
- Topics: helper, node, utility
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Conditional Utility
===================I like to group all type checking tasks into helper functions like this to be used internally. This has the advantage in case of code minification.
These functions are very inspired by PHP which already has standard functions such as `is_array()`, `is_object()`, `is_string()`, etc.
Usage
-----### CommonJS
~~~ js
const {isString} = require('@taufik-nurrohman/is');console.log(isString('false'));
~~~### ECMAScript
~~~ js
import {isString} from '@taufik-nurrohman/is';console.log(isString('false'));
~~~Methods
-------### isArray(any)
### isBoolean(any)
### isDefined(any)
### isFloat(number)
### isFunction(any)
### isInstance(object, constructor)
### isInteger(number)
### isNull(any)
### isNumber(any)
### isNumeric(string)
### isObject(any, isPlain = true)
### isScalar(any)
### isSet(any)
### isString(any)
### isVoid(any)