From f9c0514abbdf8ba16fafb68736863d14b39015ef Mon Sep 17 00:00:00 2001 From: James Halliday Date: Mon, 13 May 2013 06:47:26 -0700 Subject: [PATCH] pass objects through --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 6469014..2209eea 100644 --- a/index.js +++ b/index.js @@ -29,6 +29,7 @@ exports.parse = function (s, env) { var mapped = parse(s, env); if (typeof env !== 'function') return mapped; return mapped.reduce(function (acc, s) { + if (typeof s === 'object') return acc.concat(s); var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g')); if (xs.length === 1) return acc.concat(xs[0]); return acc.concat(xs.filter(Boolean).map(function (x) {