Socket
Socket
Sign inDemoInstall

expander

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expander - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

index.js

11

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc