Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
@swagger-api/apidom-json-pointer-relative
Advanced tools
Evaluate Relative JSON Pointer expressions against ApiDOM.
apidom-json-pointer-relative
is a package that evaluates Relative JSON Pointer against ApiDOM.
You can install this package via npm CLI by running the following command:
$ npm install @swagger-api/apidom-json-pointer-relative
import { ObjectElement } from '@swagger-api/apidom-core';
import { evaluate } from '@swagger-api/apidom-json-pointer-relative';
const root = new ObjectElement({ a: { b: 'c' } });
const current = root.get('a').get('b');
const result = evaluate('0#', current, root);
// => StringElement('b')
Parses Relative JSON Pointer into AST (Abstract Syntax Tree).
import { parse } from '@swagger-api/apidom-json-pointer-relative';
const tokens = parse('2/foo/0');
// => { nonNegativeIntegerPrefix: 2, indexManipulation: undefined, jsonPointerTokens: ['foo', '0'], hashCharacter: false }
Compiles AST into Relative JSON Pointer.
import { compile } from '@swagger-api/apidom-json-pointer-relative';
const relativeJsonPointer = compile({
nonNegativeIntegerPrefix: 2,
indexManipulation: undefined,
jsonPointerTokens: ['highly', 'nested', 'objects'],
hashCharacter: false,
}); // => '2/highly/nested/objects'
If invalid Relative JSON Pointer is supplied to parse
or evaluate
functions, InvalidRelativeJsonPointerError
is thrown.
import { InvalidRelativeJsonPointerError } from '@swagger-api/apidom-json-pointer-relative';
If valid JSON Pointer is supplied to evaluate
function and the relative pointer cannot be evaluated against
ApiDOM fragment, EvaluationRelativeJsonPointerError
is thrown.
import { EvaluationRelativeJsonPointerError } from '@swagger-api/apidom-json-pointer-relative';
1.0.0-beta.6 (2024-12-30)
FAQs
Evaluate Relative JSON Pointer expressions against ApiDOM.
The npm package @swagger-api/apidom-json-pointer-relative receives a total of 59 weekly downloads. As such, @swagger-api/apidom-json-pointer-relative popularity was classified as not popular.
We found that @swagger-api/apidom-json-pointer-relative demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.