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

16 lines (13 loc) 271 B
'use strict'; var eq = require('./eq') , some = require('./some'); module.exports = function (obj, searchValue) { var r; return some(obj, function (value, name) { if (eq(value, searchValue)) { r = name; return true; } return false; }) ? r : null; };