UNPKG

5no-schema

Version:

JSON Schema Filter/Validator

16 lines (11 loc) 238 B
import { getTypeOfValue } from '../helper' export default function({value}) { if (value === null) { return null } const typeOfValue = getTypeOfValue(value) if (typeOfValue !== 'array') { return [] } return value }