JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q49734F

Dynamic replacement in object, inspired by GruntJS config

Package Exports

  • config-templator

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (config-templator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.