react-native-ui-lib
Version:
[](https://travis-ci.org/wix/react-native-ui-lib) [](https://www.npmjs.com/package/react-native-ui-lib) [![NPM Down
26 lines (19 loc) • 514 B
JavaScript
import _ from 'lodash';
const icons = require('./icons');
const emojis = require('./emojis');
class Assets {
icons = icons;
emojis = emojis;
loadAssetsGroup(groupName, assets) {
if (!_.isString(groupName)) {
throw new Error('group name should be a string');
}
if (!_.isPlainObject(assets)) {
throw new Error('assets should be a hash map');
}
_.forEach(assets, (value, key) => {
_.set(this, `${groupName}.${key}`, value);
});
}
}
export default new Assets();