1.0.2 • Published 8 years ago

expr-prop v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

expr-prop

Replace ${foo.baz} properties in strings

Install

$ npm install --save expr-prop

Usage

const exprProp = require('expr-prop')
var obj = {
    name: 'expr-prop',
    version: '1.0.0',
    author:{
        email: 'kaifuxu@gmail.com'
    },
    dependencies: [
        {
            module: 'prop-by-string',
            version: '^1.0.1'
        }
    ]
}

exprProp.expr('name: ${name}, email: ${author.email}', obj)
// name: expr-prop, email: kaifuxu@gmail.com

exprProp.expr('depends: ${dependencies[0].module}', obj)
// depends: prop-by-string

License

MIT

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago