Sign In

@cloudelements/jmespath

Package Overview
Dependencies
Maintainers
59
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudelements/jmespath - npm Package Compare versions

Comparing version
0.16.0
to
0.17.0
bin/jmespath

Sorry, the diff of this file is not supported yet

+8
export var types: Record<string, number>;
export function search(jsonDoc: any, query: string): any;
export function decorate(fns: Record<string, {_func: Function, _signature: Array<{types: number[]}>}>):
(query: string) =>
(jsonDoc: any) =>
any;
+9
-0

@@ -0,1 +1,10 @@

# [0.17.0](https://github.com/cloud-elements/jmespath.js/compare/v0.16.0...v0.17.0) (2020-03-09)
### Features
* add minimal TypeScript definitions ([#3](https://github.com/cloud-elements/jmespath.js/issues/3)) (CU-582) ([51b422d](https://github.com/cloud-elements/jmespath.js/commit/51b422dffafc16cc98e00e773dc78a4a29811cb9))
# [0.16.0](https://github.com/cloud-elements/jmespath.js/compare/0.15.0...0.16.0) (2020-03-09)

@@ -2,0 +11,0 @@

+5
-4
{
"name": "@cloudelements/jmespath",
"description": "JMESPath implementation in Javascript",
"version": "0.16.0",
"description": "JMESPath implementation in JavaScript",
"version": "0.17.0",
"author": {

@@ -24,4 +24,5 @@ "name": "James Saryerwinnie",

"dependencies": {},
"main": "./src/jmespath",
"main": "./src/jmespath.js",
"bin": "./bin/jmespath",
"types": "./src/jmespath.d.ts",
"directories": {

@@ -46,3 +47,3 @@ "test": "test"

"changelog": "conventional-changelog -p angular -i ./CHANGELOG.md -s",
"eslint": "eslint 'bin/**' 'src/**' 'test/**'",
"eslint": "eslint 'bin/**/*' 'src/**/*.js' 'test/**/*.js'",
"mocha": "mocha test/",

@@ -49,0 +50,0 @@ "test": "npm run eslint && npm run mocha"

+12
-10
# jmespath.js
## Install
A JavaScript implementation of JMESPath, which is a query language for JSON. It will take a JSON
document and transform it into another JSON document through a JMESPath expression. This fork was
originally based from the [daz-is/jmespath.js](https://github.com/daz-is/jmespath.js) fork, which
is highly recommended to leverage instead of this project. This fork exists for strict compliance,
security, and organizational feature deviation purposes alone.
```console
$ npm install --save @cloudelements/jmespath
```
## About
jmespath.js is a Javascript implementation of JMESPath, which is a query language for JSON. It will
take a JSON document and transform it into another JSON document through a JMESPath expression.
```js

@@ -22,2 +17,9 @@ const jmespath = require('jmespath');

## Installation
```console
$ npm install --save @cloudelements/jmespath
```
## Adding custom functions

@@ -24,0 +26,0 @@

@@ -29,3 +29,3 @@ # Release

```console
$ git tag -a vY.Y.Z -m "chore(release): cut version X.Y.Z"
$ git tag -a vX.Y.Z -m "chore(release): cut version X.Y.Z"
...

@@ -32,0 +32,0 @@ $ git push --tags

#!/usr/bin/env node
const jmespath = require('../src/jmespath');
process.stdin.setEncoding('utf-8');
if (process.argv.length < 2) {
console.error("Must provide a JMESPath expression.");
process.exit(1);
}
let inputJSON = "";
process.stdin.on('readable', function() {
let chunk = process.stdin.read();
if (chunk !== null) {
inputJSON += chunk;
}
});
process.stdin.on('end', function() {
let parsedInput = JSON.parse(inputJSON);
console.log(JSON.stringify(jmespath.search(parsedInput, process.argv[2])));
});