domql
Advanced tools
Comparing version 1.4.8 to 1.4.9
@@ -6,3 +6,3 @@ { | ||
"author": "rackai", | ||
"version": "1.4.8", | ||
"version": "1.4.9", | ||
"repository": "https://github.com/rackai/domql", | ||
@@ -9,0 +9,0 @@ "publishConfig": { |
@@ -47,9 +47,5 @@ 'use strict' | ||
// if PARENT is not given | ||
// if (parent === null) parent = root | ||
// if (parent === undefined) parent = root | ||
if (!parent) parent = root | ||
if (isNode(parent)) parent = root[`${key}_parent`] = { node: parent } | ||
// if (assignedKey === 'all') debugger | ||
// if element is STRING | ||
@@ -65,2 +61,3 @@ if (isString(element) || isNumber(element)) { | ||
// create PROTOtypal inheritance | ||
applyPrototype(element, parent, options) | ||
@@ -76,5 +73,2 @@ | ||
// console.groupCollapsed('Create:', assignedKey) | ||
// console.log(element) | ||
// create and assign a KEY | ||
@@ -93,3 +87,3 @@ element.key = assignedKey | ||
// set the PATH | ||
// set the PATH array | ||
if (ENV === 'test' || ENV === 'development') { | ||
@@ -100,6 +94,4 @@ if (!parent.path) parent.path = [] | ||
// if it already HAS A NODE | ||
if (element.node) { // TODO: check on if | ||
// console.log('hasNode!') | ||
// console.groupEnd('Create:') | ||
// if it already HAS a NODE | ||
if (element.node && !element.__ifFalsy) { // TODO: check on if | ||
return assignNode(element, parent, assignedKey) | ||
@@ -147,11 +139,2 @@ } | ||
// console.log('cache.props:') | ||
// console.log(cache.props) | ||
// console.log('applied props:') | ||
// console.log(element.props) | ||
// console.log('element:') | ||
// console.log(element) | ||
// console.groupEnd('Create:') | ||
// console.group('create') | ||
@@ -158,0 +141,0 @@ // console.log(element.path) |
@@ -15,11 +15,2 @@ 'use strict' | ||
const { proto } = element | ||
// merge if proto is array | ||
// const proto = mergeAndCloneIfArray(element.proto, v => { | ||
// if (v.props) cache.props.push(v.props) | ||
// console.log('v.propsIN_PROTO:') | ||
// console.log(v.props) | ||
// }) | ||
// console.log(proto) | ||
const protoStack = getProtoStack(proto) | ||
@@ -29,9 +20,2 @@ | ||
// console.log(parent.childProto) | ||
// console.log(element) | ||
// console.log(proto) | ||
// console.log(protoStack) | ||
// debugger | ||
let childProtoStack = [] | ||
@@ -46,14 +30,5 @@ if (parent) { | ||
// console.log(proto, parent && parent.childProto) | ||
// console.log(protoStack, childProtoStack) | ||
const protoLength = protoStack.length | ||
const childProtoLength = childProtoStack.length | ||
// console.group('proto') | ||
// console.log(protoLength) | ||
// console.log(childProtoLength) | ||
// console.log(element) | ||
// console.groupEnd('proto') | ||
let stack = [] | ||
@@ -79,9 +54,6 @@ if (protoLength && childProtoLength) { | ||
const componentProto = cloneAndMergeArrayProto(getProtoStack(options.components[component])) | ||
mergedProto = deepMergeProto(mergedProto, componentProto) | ||
mergedProto = deepMergeProto(componentProto, mergedProto) | ||
} | ||
// console.log(mergedProto) | ||
return deepMergeProto(element, mergedProto) | ||
// final merging with prototype | ||
} |
55058
1665