JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2225
  • Score
    100M100P100Q117709F
  • License MIT

JSONPath, JSON Pointer and JSON Patch

Package Exports

  • json-p3
  • json-p3/dist/json-p3.cjs.js
  • json-p3/dist/json-p3.esm.js
  • json-p3/dist/json-p3.iife.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-p3) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JSON P3

JSONPath, JSON Patch and JSON Pointer for JavaScript.

LICENSE Tests NPM npm type definitions


import { jsonpath } from "json-p3";

const data = {
  users: [
    { name: "Sue", score: 100 },
    { name: "John", score: 86 },
    { name: "Sally", score: 84 },
    { name: "Jane", score: 55 },
  ],
};

const nodes = jsonpath.query("$.users[?@.score < 100].name", data);
console.log(nodes.values()); // [ 'John', 'Sally', 'Jane' ]

Bundles

JSON P3 is written in TypeScript, compiled to JavaScript using Babel, and bundled using Rollup. The following, included bundles target defaults, maintained node version, as defined by Browserslist.

JSON P3 has zero runtime dependencies.

Bundle Description
json-p3.cjs.js A CommonJS formatted bundle.
json-p3.esm.js An ECMAScript module formatted bundle.
json-p3-iife.js A bundle formatted as an Immediately Invoked Function Expression.
json-p3-iife.min.js A minified bundle formatted as an Immediately Invoked Function Expression.

Contributing

Please see Contributing to JSON P3

License

json-p3 is distributed under the terms of the MIT license.