updeep-remeda/lib/index.js

22 lines
511 B
JavaScript
Raw Normal View History

2015-08-01 15:13:25 +00:00
import update from './update';
2015-08-05 05:34:02 +00:00
import updateIn from './updateIn';
2015-08-01 15:13:25 +00:00
import omit from './omit';
import reject from './reject';
import withDefault from './withDefault';
2015-08-02 07:32:32 +00:00
import freeze from './freeze';
import curry from 'lodash/function/curry';
2015-08-02 07:32:32 +00:00
function updateAndFreeze(updates, obj) {
return freeze(update(updates, obj));
}
2015-08-01 15:13:25 +00:00
2015-08-05 04:56:01 +00:00
const updeep = curry(updateAndFreeze);
2015-08-02 07:32:32 +00:00
2015-08-05 05:34:02 +00:00
updeep.in = updateIn;
updeep.freeze = freeze;
2015-08-05 04:56:01 +00:00
updeep.omit = omit;
updeep.reject = reject;
updeep.withDefault = withDefault;
2015-08-02 07:32:32 +00:00
2015-08-05 04:56:01 +00:00
export default updeep;