UNPKG

livr

Version:

Lightweight validator supporting Language Independent Validation Rules Specification

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