UNPKG

5no-schema

Version:

JSON Schema Filter/Validator

16 lines (11 loc) 249 B
import { getTypeOfValue } from '../helper' export default function({value}) { if (value === null) { return null } const typeOfValue = getTypeOfValue(value) if (typeOfValue === 'string') { return value.trim() } return value }