heimdalljs
Advanced tools
Comparing version 0.1.6 to 0.2.0
@@ -1696,2 +1696,9 @@ function indexOf(callbacks, callback) { | ||
}, { | ||
key: 'forEachChild', | ||
value: function forEachChild(cb) { | ||
for (var i = 0; i < this._children.length; ++i) { | ||
cb(this._children[i]); | ||
} | ||
} | ||
}, { | ||
key: 'remove', | ||
@@ -2036,4 +2043,4 @@ value: function remove() { | ||
// The name of the property encodes the session/node compatibilty version | ||
if (!global._heimdall_session_1) { | ||
global._heimdall_session_1 = new HeimdallSession(); | ||
if (!global._heimdall_session_2) { | ||
global._heimdall_session_2 = new HeimdallSession(); | ||
} | ||
@@ -2044,4 +2051,4 @@ } | ||
var index = new Heimdall(process._heimdall_session_1); | ||
var index = new Heimdall(process._heimdall_session_2); | ||
module.exports = index; |
@@ -1696,2 +1696,9 @@ function indexOf(callbacks, callback) { | ||
}, { | ||
key: 'forEachChild', | ||
value: function forEachChild(cb) { | ||
for (var i = 0; i < this._children.length; ++i) { | ||
cb(this._children[i]); | ||
} | ||
} | ||
}, { | ||
key: 'remove', | ||
@@ -2036,4 +2043,4 @@ value: function remove() { | ||
// The name of the property encodes the session/node compatibilty version | ||
if (!global._heimdall_session_1) { | ||
global._heimdall_session_1 = new HeimdallSession(); | ||
if (!global._heimdall_session_2) { | ||
global._heimdall_session_2 = new HeimdallSession(); | ||
} | ||
@@ -2044,4 +2051,4 @@ } | ||
var index = new Heimdall(process._heimdall_session_1); | ||
var index = new Heimdall(process._heimdall_session_2); | ||
export default index; |
@@ -1697,2 +1697,10 @@ var heimdall = (function () { | ||
}, { | ||
key: 'forEachChild', | ||
value: function forEachChild(cb) { | ||
debugger; | ||
for (var i = 0; i < this._children[i].length; ++i) { | ||
cb(this._children[i]); | ||
} | ||
} | ||
}, { | ||
key: 'remove', | ||
@@ -2037,4 +2045,4 @@ value: function remove() { | ||
// The name of the property encodes the session/node compatibilty version | ||
if (!global._heimdall_session_1) { | ||
global._heimdall_session_1 = new HeimdallSession(); } | ||
if (!global._heimdall_session_2) { | ||
global._heimdall_session_2 = new HeimdallSession(); } | ||
} | ||
@@ -2045,5 +2053,5 @@ | ||
// browser equivalent of heimdall.js | ||
window.Heimdall = Heimdall; | ||
self.Heimdall = Heimdall; | ||
var index = new Heimdall(window._heimdall_session_1); | ||
var index = new Heimdall(window._heimdall_session_2); | ||
@@ -2050,0 +2058,0 @@ return index; |
@@ -1702,2 +1702,10 @@ (function (global, factory) { | ||
}, { | ||
key: 'forEachChild', | ||
value: function forEachChild(cb) { | ||
debugger; | ||
for (var i = 0; i < this._children[i].length; ++i) { | ||
cb(this._children[i]); | ||
} | ||
} | ||
}, { | ||
key: 'remove', | ||
@@ -2042,4 +2050,4 @@ value: function remove() { | ||
// The name of the property encodes the session/node compatibilty version | ||
if (!global._heimdall_session_1) { | ||
global._heimdall_session_1 = new HeimdallSession(); | ||
if (!global._heimdall_session_2) { | ||
global._heimdall_session_2 = new HeimdallSession(); | ||
} | ||
@@ -2051,5 +2059,5 @@ } | ||
// browser equivalent of heimdall.js | ||
window.Heimdall = Heimdall; | ||
self.Heimdall = Heimdall; | ||
var index = new Heimdall(window._heimdall_session_1); | ||
var index = new Heimdall(window._heimdall_session_2); | ||
@@ -2056,0 +2064,0 @@ return index; |
{ | ||
"name": "heimdalljs", | ||
"version": "0.1.6", | ||
"version": "0.2.0", | ||
"description": "Structured instrumentation library", | ||
@@ -13,3 +13,3 @@ "main": "dist/heimdalljs.cjs.js", | ||
"test": "npm run build:node && npm run build:test && mocha dist/tests/bundle.cjs", | ||
"test:debug": "mocha --no-timeouts debug tests/" | ||
"test:debug": "mocha --no-timeouts debug dist/tests/bundle.cjs" | ||
}, | ||
@@ -16,0 +16,0 @@ "repository": { |
@@ -63,3 +63,3 @@ ![build status](https://travis-ci.org/heimdalljs/heimdalljs-lib.svg) | ||
- `visitPreOrder(callback)` sugar for `root.visitPreOrder(callback)` | ||
- `visitPostOrder(callback)`` sugar for `root.visitPostOrder(callback)` | ||
- `visitPostOrder(callback)` sugar for `root.visitPostOrder(callback)` | ||
@@ -81,2 +81,4 @@ | ||
depth-first post-order traversal. | ||
- `forEachChild(callback)` invoke `callback` for each child of this node (but | ||
not other descendants). | ||
- `remove` remove this node from its parent. May only be called on an inactive, | ||
@@ -83,0 +85,0 @@ non-root node. Intended for long-running applications to free up memory after |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1172020
37459
287