config-templator

0.0.8 • Public • Published

config-templator Build Status Dependency Status

Dynamic replacement in object, inspired by GruntJS config

Getting Started

Install the module with: npm install config-templator

Documentation

(Coming soon)

Examples

Flatten:

var config = { foo: 'bar', baz: '<%= bar %>' };

var config-templator = require('config-templator');
config = config-templator.flatten(config); // { foo: 'bar', baz: 'bar' }

Get:

config = config-templator.get(config, 'baz'); // bar

More examples

var config = { port: 3000, uri: 'localhost:<%= port %>' };

var config-templator = require('config-templator');
config = config-templator.get(config, 'uri'); // localhost:3000

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 Loic Mahieu. Licensed under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i config-templator

Weekly Downloads

21

Version

0.0.8

License

none

Last publish

Collaborators

  • loicmahieu