Hans 601f9b38f8 feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
2017-02-01 18:19:50 -08:00

37 lines
763 B
JavaScript

'use strict';
var commandProperties = [
'name',
'description',
'aliases',
'works',
'availableOptions',
'anonymousOptions'
];
var blueprintProperties = [
'name',
'description',
'availableOptions',
'anonymousOptions',
'overridden'
];
function forEachWithProperty(properties, forEach, context) {
return properties.filter(function(key) {
return this[key] !== undefined;
}, context).forEach(forEach, context);
}
module.exports = {
command: {
forEachWithProperty: function(forEach, context) {
return forEachWithProperty(commandProperties, forEach, context);
}
},
blueprint: {
forEachWithProperty: function(forEach, context) {
return forEachWithProperty(blueprintProperties, forEach, context);
}
}
};