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.
18 lines
444 B
JavaScript
18 lines
444 B
JavaScript
4 years ago
|
"use strict";
|
||
|
|
||
|
const { validateValue } = require("@validatem/core");
|
||
|
const isArguments = require("./");
|
||
|
|
||
|
function callImmediately(func) {
|
||
|
return func();
|
||
|
}
|
||
|
|
||
|
callImmediately(function () {
|
||
|
console.log(validateValue(arguments, [ isArguments ])); // [Arguments] {}
|
||
|
});
|
||
|
|
||
|
console.log(validateValue("hello world", [ isArguments ])); /*
|
||
|
AggregrateValidationError: One or more validation errors occurred:
|
||
|
- At (root): Must be an arguments object
|
||
|
*/
|