config-templator
Dynamic replacement in object, inspired by GruntJS config
Last updated 11 years ago by loicmahieu .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install config-templator 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.0.8                                ...           latest (11 years ago)

8 Versions

  • 0.0.8                                ...           11 years ago
  • 0.0.7                                ...           12 years ago
  • 0.0.6                                ...           12 years ago
  • 0.0.5                                ...           13 years ago
  • 0.0.4                                ...           13 years ago
  • 0.0.3                                ...           13 years ago
  • 0.0.2                                ...           13 years ago
  • 0.0.1                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (5)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |