@@ -9,7 +9,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var cowValueModel = exports.cowValueModel = function cowValueModel(key) {
- var keys = key.split('.');
+ var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : key.split('.');
function setField() {
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -1,6 +1,4 @@
-export const cowValueModel = key => {
- const keys = key.split('.');
-
+export const cowValueModel = (key, keys = key.split('.')) => {
function setField (x = {}, index, val) {
if (index >= keys.length) return val;
const key = keys[index],