json-templater
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -31,8 +31,2 @@ var renderString = require('./string'); | ||
switch (typeof input) { | ||
// these types cannot be mutated | ||
case 'boolean': | ||
case 'number': | ||
case 'undefined': | ||
return input; | ||
// object is slightly special if null we move on | ||
@@ -45,2 +39,5 @@ case 'object': | ||
return handler(input); | ||
// all other types cannot be mutated | ||
default: | ||
return input; | ||
} | ||
@@ -47,0 +44,0 @@ } |
{ | ||
"name": "json-templater", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Simple json/js object template strings", | ||
"main": "template.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha *_test.js" | ||
"test": "mocha *_test.js", | ||
"bench": "node-bench bench/object.js" | ||
}, | ||
@@ -9,0 +10,0 @@ "repository": { |
@@ -41,3 +41,3 @@ # json-templater [![Build Status](https://travis-ci.org/lightsofapollo/json-templater.svg?branch=master)](https://travis-ci.org/lightsofapollo/json-templater) | ||
{ | ||
magic_key_magic: { | ||
magic_key_key: { | ||
key: 'interpolation is nice value' | ||
@@ -44,0 +44,0 @@ } |
9676
290