joshrtay / lambda-json

Convert JSON with embedded functions to static JSON.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lambda-json

Build status Git tag NPM version Code style

Convert JSON with embedded functions to static JSON.

Installation

$ npm install lambda-json

Usage

var lambdaJSON = require('lambda-json')

var obj = {
  foo: {
    bar: (props) => props.bar
  }
}

lambdaJSON(obj, {bar: ''woot}) // => {foo: {bar: 'woot'}}

API

lambdaJSON(obj, props)

  • obj - The lambda json object.
  • props - Properties to embedded functions or generators.

Returns: The computed plain JSON.

License

MIT

About

Convert JSON with embedded functions to static JSON.


Languages

Language:JavaScript 85.5%Language:Makefile 14.5%