UNPKG

@pfx/base

Version:

Plugin with basic operations for pf, the fast and extensible command-line data (e.g. JSON) processor and transformer

15 lines (13 loc) 396 B
module.exports = { name: 'string', desc: 'applies Object.prototype.toString to the input and adds newlines.', func: ({}) => values => { let str = '' const err = [] for (let index = 0; index < values.length; index++) { const value = values[index] if (typeof value !== 'undefined' && value !== null) str += value.toString() + '\n' } return {err, str} } }