UNPKG

react-native-ui-lib

Version:

[![Build Status](https://travis-ci.org/wix/react-native-ui-lib.svg?branch=master)](https://travis-ci.org/wix/react-native-ui-lib) [![npm](https://img.shields.io/npm/v/react-native-ui-lib.svg)](https://www.npmjs.com/package/react-native-ui-lib) [![NPM Down

26 lines (19 loc) 514 B
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();