1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;
|
8 | function boolean(value) {
|
9 | return value === true || value === false;
|
10 | }
|
11 | exports.boolean = boolean;
|
12 | function string(value) {
|
13 | return typeof value === 'string' || value instanceof String;
|
14 | }
|
15 | exports.string = string;
|
16 | function number(value) {
|
17 | return typeof value === 'number' || value instanceof Number;
|
18 | }
|
19 | exports.number = number;
|
20 | function error(value) {
|
21 | return value instanceof Error;
|
22 | }
|
23 | exports.error = error;
|
24 | function func(value) {
|
25 | return typeof value === 'function';
|
26 | }
|
27 | exports.func = func;
|
28 | function array(value) {
|
29 | return Array.isArray(value);
|
30 | }
|
31 | exports.array = array;
|
32 | function stringArray(value) {
|
33 | return array(value) && value.every(elem => string(elem));
|
34 | }
|
35 | exports.stringArray = stringArray;
|