Comparing version 0.2.2 to 0.3.0
{ | ||
"name": "expander", | ||
"description": "Expand template strings in declarative configurations.", | ||
"version": "0.2.2", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/tkellen/expander", | ||
@@ -23,3 +23,3 @@ "author": { | ||
], | ||
"main": "lib/expander", | ||
"main": "index.js", | ||
"engines": { | ||
@@ -29,8 +29,7 @@ "node": ">= 0.8.0" | ||
"scripts": { | ||
"test": "grunt" | ||
"test": "mocha -R spec test/index.js" | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "~0.7.1", | ||
"grunt-contrib-nodeunit": "~0.2.2", | ||
"grunt": "~0.4.1" | ||
"mocha": "~1.17.1", | ||
"chai": "~1.9.0" | ||
}, | ||
@@ -37,0 +36,0 @@ "keywords": [ |
@@ -8,3 +8,3 @@ # expander [![Build Status](https://secure.travis-ci.org/tkellen/node-expander.png?branch=master)](http://travis-ci.org/tkellen/node-expander) | ||
```js | ||
var expander = require('./lib/expander'); | ||
var expander = require('expander'); | ||
@@ -57,2 +57,25 @@ var data = { | ||
expander.get(data, 'methodRefContext'); // value | ||
// getter setter api | ||
var config = expander.interface(config); | ||
config('keyRef'); // value | ||
config('recursiveKeyRef'); // value | ||
config('arrayRef'); // ['test', 'value'] | ||
config('recursiveArrayRef'); // ['test', ['test', 'value']] | ||
config('obj'); // { | ||
// keyRef: 'value', | ||
// recursiveKeyRef: 'value', | ||
// arrayRef: ['test', 'value'], | ||
// recursiveArrayRef: ['test', ['test', 'value']] | ||
// } | ||
config('objRef'); // { | ||
// keyRef: 'value', | ||
// recursiveKeyRef: 'value', | ||
// arrayRef: ['test', 'value'], | ||
// recursiveArrayRef: ['test', ['test', 'value']] | ||
// } | ||
config('interpolated'); // test value | ||
config('interpolatedRecursiveRef'); // test value | ||
config('methodRef'); // value | ||
config('methodRefContext'); // value | ||
``` | ||
@@ -62,5 +85,6 @@ | ||
* 2014-02-10 - v0.3.0 - support a getter/setter api | ||
* 2013-12-15 - v0.2.2 - support auto expansion of functions | ||
* 2013-11-21 - v0.2.1 - support ${value} strings | ||
* 2013-11-08 - v0.2.0 - correctly handle recursively interpolated values | ||
* 2013-11-05 - v0.1.0 - initial release | ||
* 2013-11-05 - v0.1.0 - initial release |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8823
2
102
88
1