Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loicmahieu/config-templator
Dynamic remplacment in object, inspired by GruntJS config
https://github.com/loicmahieu/config-templator
Last synced: 27 days ago
JSON representation
Dynamic remplacment in object, inspired by GruntJS config
- Host: GitHub
- URL: https://github.com/loicmahieu/config-templator
- Owner: LoicMahieu
- Created: 2013-08-16T14:28:03.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-24T11:51:10.000Z (almost 8 years ago)
- Last Synced: 2024-09-30T15:35:32.315Z (3 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# config-templator [![Build Status](https://secure.travis-ci.org/LoicMahieu/config-templator.png?branch=master)](http://travis-ci.org/loicmahieu/config-templator) [![Dependency Status](https://gemnasium.com/LoicMahieu/config-templator.png)](https://gemnasium.com/LoicMahieu/config-templator)
Dynamic replacement in object, inspired by GruntJS config
## Getting Started
Install the module with: `npm install config-templator`## Documentation
_(Coming soon)_## Examples
Flatten:
```javascript
var config = { foo: 'bar', baz: '<%= bar %>' };var config-templator = require('config-templator');
config = config-templator.flatten(config); // { foo: 'bar', baz: 'bar' }
```Get:
```javascript
config = config-templator.get(config, 'baz'); // bar
```### More examples
```javascript
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](http://gruntjs.com/).## Release History
_(Nothing yet)_## License
Copyright (c) 2013 Loic Mahieu. Licensed under the MIT license.