Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

good-enough-parser

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

good-enough-parser - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

3

dist/cjs/query/util.d.ts
import { Node } from '../parser/types';
import { Checkpoint } from './types';
export { klona as clone } from 'klona/json';
export declare function freeze<T>(input: T): T;
export declare function freezeCheckpoint<Ctx>(checkpoint: Checkpoint<Ctx>): Checkpoint<Ctx>;
export declare function coerceHandler<Ctx, T extends Node = Node>(handler: ((ctx: Ctx, token: T) => Ctx) | null | undefined): (ctx: Ctx, token: T) => Ctx;
//# sourceMappingURL=util.d.ts.map

21

dist/cjs/query/util.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerceHandler = exports.freezeCheckpoint = exports.freeze = exports.clone = void 0;
const deep_freeze_es6_1 = require("deep-freeze-es6");
var json_1 = require("klona/json");
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return json_1.klona; } });
function freeze(input) {
return (0, deep_freeze_es6_1.default)(input);
}
exports.freeze = freeze;
function freezeCheckpoint(checkpoint) {
return freeze({
...checkpoint,
context: freeze(checkpoint.context),
});
}
exports.freezeCheckpoint = freezeCheckpoint;
exports.coerceHandler = exports.clone = void 0;
const json_1 = require("klona/json");
var json_2 = require("klona/json");
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return json_2.klona; } });
function coerceHandler(handler) {
return handler
? (context, token) => handler(freeze(context), token)
? (context, token) => handler((0, json_1.klona)(context), token)
: (context, _) => context;

@@ -22,0 +11,0 @@ }

import { Node } from '../parser/types';
import { Checkpoint } from './types';
export { klona as clone } from 'klona/json';
export declare function freeze<T>(input: T): T;
export declare function freezeCheckpoint<Ctx>(checkpoint: Checkpoint<Ctx>): Checkpoint<Ctx>;
export declare function coerceHandler<Ctx, T extends Node = Node>(handler: ((ctx: Ctx, token: T) => Ctx) | null | undefined): (ctx: Ctx, token: T) => Ctx;
//# sourceMappingURL=util.d.ts.map

@@ -1,17 +0,8 @@

import deepFreeze from 'deep-freeze-es6';
import { klona as clone } from 'klona/json';
export { klona as clone } from 'klona/json';
export function freeze(input) {
return deepFreeze(input);
}
export function freezeCheckpoint(checkpoint) {
return freeze({
...checkpoint,
context: freeze(checkpoint.context),
});
}
export function coerceHandler(handler) {
return handler
? (context, token) => handler(freeze(context), token)
? (context, token) => handler(clone(context), token)
: (context, _) => context;
}
//# sourceMappingURL=util.js.map
{
"name": "good-enough-parser",
"description": "Parse and query computer programs source code",
"version": "1.1.1",
"version": "1.1.2",
"repository": "git@github.com:zharinov/good-enough-parser.git",

@@ -39,3 +39,2 @@ "author": "Sergei Zharinov",

"@types/moo": "0.5.5",
"deep-freeze-es6": "1.4.1",
"klona": "2.0.5",

@@ -42,0 +41,0 @@ "moo": "0.5.1"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc