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

23 lines (19 loc) 606 B
var current = process.versions.node.split('.'); function versionIncluded(version) { if (version === '*') return true; var versionParts = version.split('.'); for (var i = 0; i < 3; ++i) { if ((current[i] || 0) >= (versionParts[i] || 0)) return true; } return false; } var data = require('./core.json'); var core = {}; for (var version in data) { if (Object.prototype.hasOwnProperty.call(data, version) && versionIncluded(version)) { for (var i = 0; i < data[version].length; ++i) { core[data[version][i]] = true; } } } module.exports = core;