1.0.0 ā¢ Published 9 years ago
yugo v1.0.0
yugo
Description
š„ yugo is simple JavaScript utility for conditionally joining objects.
For example, Manage the StyleSheet of React Native.
Inspired by classnames.
Installation
npm i yugo
Usage
Use with node.js, browserify, webpack:
var yugo = require(yugo);
Join Objects. Overwrite.
Caution : Do Not Use Nested Object. Destructive.
yugo({a: 'a'}, {b: 'b'}, {b: 'c'}); // => {a: 'a', b: 'c'}
Conditionaly Join Objects. Use Array.
yugo({a: 'a'}, [{b: 'b'}, true], {c: 'c'}); // => {a: 'a', b: 'b', c: 'c'}
yugo({a: 'a'}, [{b: 'b'}, false], {c: 'c'}); // => {a: 'a', c: 'c'}
1.0.0
9 years ago