@ -131,6 +131,12 @@ $ cat package.json | fx 'Object.keys(this.dependencies)'
]
```
By the way, fx has shortcut for `Object.keys(this)`. Previous example can be rewritten as:
$ cat package.json | fx this.dependencies ?
## Related
@ -55,6 +55,8 @@ function reduce(json, code) {
}; fn
`)
return fx.call(json)
} else if (/^\?$/.test(code)) {
return Object.keys(json)
} else {
const fx = eval(`function fn() { return ${code} }; fn`)