Comparing version 0.3.4 to 0.3.5
@@ -62,5 +62,3 @@ "use strict"; | ||
case 0: | ||
cp = typeof component === "function" ? component({ | ||
_: _ | ||
}) : component; | ||
cp = typeof component === "function" ? component({ _: _, $: lifeCycle }) : component; | ||
name = cp.name; | ||
@@ -67,0 +65,0 @@ |
@@ -9,52 +9,54 @@ "use strict"; | ||
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 v0 = exports.v0 = function v0(_ref) { | ||
var _ = _ref._; | ||
return { | ||
name: "v0", | ||
_awake: function _awake() { | ||
_.hooks._hooks = [function (_ref2) { | ||
var _key = _ref2._key, | ||
_val = _ref2._val, | ||
cp = _ref2.cp; | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
var _ = _ref._, | ||
$ = _ref.$; | ||
return _defineProperty({ | ||
name: "v0" | ||
}, $[0], function () { | ||
_.hooks._hooks = [function (_ref2) { | ||
var _key = _ref2._key, | ||
_val = _ref2._val, | ||
cp = _ref2.cp; | ||
var _iteratorNormalCompletion = true; | ||
var _didIteratorError = false; | ||
var _iteratorError = undefined; | ||
try { | ||
for (var _iterator = Object.entries(_val())[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var _ref3 = _step.value; | ||
try { | ||
for (var _iterator = Object.entries(_val())[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
var _ref3 = _step.value; | ||
var _ref4 = _slicedToArray(_ref3, 2); | ||
var _ref4 = _slicedToArray(_ref3, 2); | ||
var key = _ref4[0]; | ||
var val = _ref4[1]; | ||
var key = _ref4[0]; | ||
var val = _ref4[1]; | ||
if (val) { | ||
if (!_.hooks[key]) { | ||
_.hooks[key] = []; | ||
} | ||
_.hooks[key].push(val.bind(cp)); | ||
if (val) { | ||
if (!_.hooks[key]) { | ||
_.hooks[key] = []; | ||
} | ||
_.hooks[key].push(val.bind(cp)); | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} | ||
} catch (err) { | ||
_didIteratorError = true; | ||
_iteratorError = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
if (_didIteratorError) { | ||
throw _iteratorError; | ||
} | ||
} | ||
}]; | ||
} | ||
}; | ||
} | ||
}]; | ||
}); | ||
}; | ||
var v1 = exports.v1 = function v1(_ref5) { | ||
var _ = _ref5._; | ||
var v1 = exports.v1 = function v1(_ref6) { | ||
var _ = _ref6._; | ||
return { | ||
@@ -64,6 +66,6 @@ name: "v1", | ||
return { | ||
_methods: function _methods(_ref6) { | ||
var key = _ref6.key, | ||
val = _ref6.val, | ||
cp = _ref6.cp; | ||
_methods: function _methods(_ref7) { | ||
var key = _ref7.key, | ||
val = _ref7.val, | ||
cp = _ref7.cp; | ||
@@ -76,5 +78,5 @@ if (!cp[key]) { | ||
}, | ||
_data: function _data(_ref7) { | ||
var _val = _ref7._val, | ||
cp = _ref7.cp; | ||
_data: function _data(_ref8) { | ||
var _val = _ref8._val, | ||
cp = _ref8.cp; | ||
@@ -88,8 +90,8 @@ var props = _val(); | ||
for (var _iterator2 = Object.entries(props)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
var _ref8 = _step2.value; | ||
var _ref9 = _step2.value; | ||
var _ref9 = _slicedToArray(_ref8, 2); | ||
var _ref10 = _slicedToArray(_ref9, 2); | ||
var key = _ref9[0]; | ||
var val = _ref9[1]; | ||
var key = _ref10[0]; | ||
var val = _ref10[1]; | ||
@@ -96,0 +98,0 @@ if (!cp[key]) { |
{ | ||
"name": "menhera", | ||
"version": "0.3.4", | ||
"version": "0.3.5", | ||
"main": "dist", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -69,4 +69,4 @@ # Menhera | ||
}).$mount({ | ||
2: [cliTest] | ||
3: [cliTest] | ||
}); | ||
``` |
15914
306