Comparing version 0.6.6-rc3 to 0.6.6
@@ -61,3 +61,3 @@ "use strict"; | ||
if (Array.isArray(_val)) { | ||
_val.forEach(function (val) { | ||
(0, _utils.$)(_val, function (key, val) { | ||
if (typeof val === "function") { | ||
@@ -64,0 +64,0 @@ onFunction({ depth: depth, _val: val }); |
@@ -100,3 +100,3 @@ "use strict"; | ||
var newDepth = depth ? depth + ("." + _key) : _key; | ||
onAny && onAny({ | ||
var out = onAny && onAny({ | ||
hook: "onAny", | ||
@@ -103,0 +103,0 @@ object: object, |
@@ -30,3 +30,3 @@ "use strict"; | ||
var use = function use(_, _object) { | ||
var $use = exports.$use = function $use(_, _object) { | ||
var hooks = (0, _scanHooks.useHooks)(_); | ||
@@ -41,2 +41,5 @@ var BindHook = function BindHook(_ref) { | ||
var validHook = (0, _lodash6.default)(_.hooks, depth); | ||
if (depth != "" && !validHook) return; | ||
var _hooks = hooks[hook]; | ||
@@ -53,6 +56,5 @@ _hooks && (0, _utils.$)(_hooks, function (key, hook) { | ||
hook && BindHook(data); | ||
var validHook = (0, _lodash6.default)(_.hooks, depth); | ||
if (depth != "" && !validHook) return; | ||
hook && BindHook(data); | ||
@@ -69,14 +71,7 @@ (0, _utils.scanObject)({ | ||
}; | ||
onObject({ object: _object, depth: "" }); | ||
}; | ||
(typeof _object === "undefined" ? "undefined" : (0, _typeof3.default)(_object)) === "object" && onObject({ object: _object, depth: "" }); | ||
Array.isArray(_object) && (0, _utils.$)(_object, function (key, object) { | ||
return onObject({ object: object, depth: "" }); | ||
}); | ||
var $use = exports.$use = function $use(_, _object) { | ||
if ((typeof _object === "undefined" ? "undefined" : (0, _typeof3.default)(_object)) === "object") { | ||
use(_, _object); | ||
} | ||
if (Array.isArray(_object)) { | ||
_object.forEach(function (o) { | ||
use(_, o); | ||
}); | ||
} | ||
return _; | ||
@@ -125,2 +120,3 @@ }; | ||
onObject({ object: _object, depth: "" }); | ||
return cache; | ||
@@ -127,0 +123,0 @@ } |
@@ -45,4 +45,4 @@ "use strict"; | ||
var __ = depth + "._"; | ||
var _Hooks = (0, _lodash2.default)(_2.hooks, __, []); | ||
_Hooks.length > 0 && _Hooks.forEach(function (h) { | ||
var hooks = (0, _lodash2.default)(_2.hooks, __, []); | ||
hooks.length > 0 && hooks.forEach(function (h) { | ||
return h({ _: _2, _key: _key, _val: _val, cp: _object }); | ||
@@ -49,0 +49,0 @@ }); |
{ | ||
"name": "menhera", | ||
"version": "0.6.6-rc3", | ||
"version": "0.6.6", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "files": [ |
24057
612