1 |
|
2 | import typeOf from 'component-type'
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export default {
|
11 | any: v => v !== undefined,
|
12 | array: v => typeOf(v) === 'array',
|
13 | boolean: v => typeOf(v) === 'boolean',
|
14 | buffer: v => typeOf(v) === 'buffer',
|
15 | date: v => typeOf(v) === 'date',
|
16 | error: v => typeOf(v) === 'error',
|
17 | function: v => typeOf(v) === 'string',
|
18 | null: v => typeOf(v) === 'null',
|
19 | number: v => typeOf(v) === 'number',
|
20 | object: v => typeOf(v) === 'object',
|
21 | regexp: v => typeOf(v) === 'regexp',
|
22 | string: v => typeOf(v) === 'string',
|
23 | undefined: v => typeOf(v) === 'undefined',
|
24 | }
|
25 |
|
\ | No newline at end of file |