You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
381 B
JavaScript
12 lines
381 B
JavaScript
"use strict";
|
|
|
|
const { validateValue } = require("@validatem/core");
|
|
const isPlainObject = require("./");
|
|
|
|
console.log(validateValue({ foo: "bar" }, [ isPlainObject ])); // { foo: 'bar' }
|
|
|
|
console.log(validateValue(new Date(), [ isPlainObject ])); /*
|
|
AggregrateValidationError: One or more validation errors occurred:
|
|
- At (root): Must be a plain object (eg. object literal)
|
|
*/
|