jsmicro-is-date
Version:
Check does the given Javascript Object is a date.
61 lines (41 loc) • 1.17 kB
Markdown
Check does the given Javascript Object (array, object, string, etc) is a date.
### **`isNotDate(object)`**
Check does the given Javascript Date (array, object, string, etc) is not a date.
## Browser Usage
```bash
bower install --save jsmicro-is-date
```
```html
<script type="text/javascript" src="bower_components/jsmicro-is-date/index.js">
<script type="text/javascript">
var obj = new Date();
var nbr = 200;
// Available in the window object.
isDate(obj); // true
isDate(nbr); // false
isNotDate(nbr); // true
</script>
```
```bash
npm install --save jsmicro-is-date
```
```js
const obj = require('jsmicro-is-date');
// Available in the global object.
isDate(new Date()); // true
isDate(23322333); // false
isNotDate(23234); // true
// Also available in the export object.
obj.isDate(new Date()); // true
obj.isDate(23322333); // false
obj.isNotDate(23333); // true
```
* Added .npmignore
* Initial release.