algebra
Version:
means completeness and balancing, from the Arabic word الجبر
20 lines (16 loc) • 356 B
JavaScript
const toData = require('./toData')
/**
* Get an operator that coerces arguments to data.
*
* @api private
*
* @param {Function} operator
*
* @returns {Function} anonymous coerced operator
*/
function coerced (operator) {
return function () {
return operator.apply(null, [].slice.call(arguments).map(toData))
}
}
module.exports = coerced