mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 15:04:45 +00:00
18 lines
524 B
JavaScript
18 lines
524 B
JavaScript
'use strict';
|
|
|
|
var defaultProps = require('./ast-properties');
|
|
var objectKeys = require('core-js/library/fn/object/keys');
|
|
var assign = require('core-js/library/fn/object/assign');
|
|
|
|
module.exports = function createWhitelist (options) {
|
|
var opts = assign({}, options);
|
|
var typeName, i, len;
|
|
var keys = objectKeys(defaultProps);
|
|
var result = {};
|
|
for (i = 0, len = keys.length; i < len; i += 1) {
|
|
typeName = keys[i];
|
|
result[typeName] = defaultProps[typeName].concat(opts.extra || []);
|
|
}
|
|
return result;
|
|
};
|