From 9fbc6267a4f6cd87c92fa6f57f437aacbac4fb72 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 13 Jan 2015 22:51:51 -0800 Subject: Initialize fields in objects to null rather than undefined. Big speed boost. --- js/lib/node.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'js/lib/node.js') diff --git a/js/lib/node.js b/js/lib/node.js index e58c7c7..c90c3e9 100644 --- a/js/lib/node.js +++ b/js/lib/node.js @@ -72,17 +72,17 @@ var Node = function(nodeType, sourcepos) { this.sourcepos = sourcepos; this.last_line_blank = false; this.open = true; - this.strings = undefined; - this.string_content = undefined; - this.literal = undefined; - this.list_data = undefined; - this.info = undefined; - this.destination = undefined; - this.title = undefined; - this.fence_char = undefined; - this.fence_length = undefined; - this.fence_offset = undefined; - this.level = undefined; + this.strings = null; + this.string_content = null; + this.literal = null; + this.list_data = null; + this.info = null; + this.destination = null; + this.title = null; + this.fence_char = null; + this.fence_length = null; + this.fence_offset = null; + this.level = null; }; Node.prototype.isContainer = function() { -- cgit v1.2.3