UNPKG

livr

Version:

Lightweight validator supporting Language Independent Validation Rules Specification

12 lines (9 loc) 320 B
const util = require('../../util'); function trim() { return (value, params, outputArr) => { if (util.isNoValue(value) || typeof value === 'object') return; const strValue = typeof value === 'string' ? value : String(value); outputArr.push(strValue.trim()); }; } module.exports = trim;