Constructor
# new IsObject()
- Since:
- 1.3.0
- Copyright:
- schukai GmbH
Example
import {IsObject} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.23.0/dist/modules/constraints/isobject.js';
new IsObject()
.isValid({})
.then(()=>console.log(true));
// ↦ true
new IsObject()
.isValid(99)
.catch(e=>console.log(e));
// ↦ 99
Methods
# isValid(value) → {Promise}
this method return a promise containing the result of the check.
Parameters:
Name | Type | Description |
---|---|---|
value |
* |
Returns:
- Type
- Promise