0.1.2 • Published 8 years ago

blacktea.jsonTemplates v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

#blacktea.jsonTemplates This library provides a simple way of templating json files. It basically enables you to add variables/objects/function calls to a json file without having to save it as a js file. It can be helpful, if you have to use json files but want to add some dynamism to them.

##Overview

##Installation Install it via the npm command: npm install blacktea.jsonTemplates --save No bower yet, or ever. ##Usage First you load the library: var t = require("blacktea.jsonTemplates"); Now you can start adding objects, that should be available in your json files.For example:

var testObject = {
    add:function(a,b){
        return a+b;
    }
};
//first argument is a key, the second one is the object you want to add
t.add("test",testObject);