New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@criteria/json-pointer

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@criteria/json-pointer

Implementation of JSON Pointer (RFC 6901).

latest
Source
npmnpm
Version
0.2.1
Version published
Weekly downloads
42K
-3.12%
Maintainers
1
Weekly downloads
 
Created
Source

JSON Pointer

Implementation of JSON Pointer (RFC 6901).

Installation

npm install @criteria/json-pointer

Usage

Evaluate a JSON Pointer:

import { evaluateJSONPointer } from '@criteria/json-pointer'

const str = '#/foo'
const document = {
    foo: true
}

const value = evaluateJSONPointer(str, document)
// value === true

Validate that a string is a JSON Pointer:

import { validateJSONPointer } from '@criteria/json-pointer'

const str = '#/foo'

try {
  validateJSONPointer(str)
  // valid
} catch (err) {
  // not valid
}

Keywords

json

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts