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

20 lines (14 loc) 457 B
'use strict'; var value = require('es5-ext/object/valid-object') , hasOwnProperty = Object.prototype.hasOwnProperty; module.exports = function (emitter/*, type*/) { var type = arguments[1], data; value(emitter); if (type !== undefined) { data = hasOwnProperty.call(emitter, '__ee__') && emitter.__ee__; if (!data) return; if (data[type]) delete data[type]; return; } if (hasOwnProperty.call(emitter, '__ee__')) delete emitter.__ee__; };