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
22 lines (21 loc) • 600 B
JavaScript
import _ from "lodash";
import { icons } from "./icons";
import { emojis } from "./emojis";
class Assets {
constructor() {
this.icons = icons;
this.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();