UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

13 lines (11 loc) 328 B
'use strict'; var mapObj = require('map-obj'); var camelCase = require('camelcase'); module.exports = function (input, options) { options = options || {}; var exclude = options.exclude || []; return mapObj(input, function (key, val) { key = exclude.indexOf(key) === -1 ? camelCase(key) : key; return [key, val]; }); };