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

@locker/ast-lib-maker

Package Overview
Dependencies
Maintainers
7
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@locker/ast-lib-maker - npm Package Compare versions

Comparing version 0.14.0 to 0.14.1

9

dist/index.cjs.js

@@ -231,6 +231,11 @@ /**

function createLib(overrides) {
return shared.ObjectAssign(shared.ObjectCreate(null), baseLib, overrides);
return {
// @ts-ignore
__proto__: null,
...baseLib,
...overrides,
};
}
exports.createLib = createLib;
/** version: 0.14.0 */
/** version: 0.14.1 */
/**
* Copyright (C) 2020 salesforce.com, inc.
*/
import { ObjectAssign, ObjectCreate, JSONStringify, JSONParse, ArrayIsArray, isObject } from '@locker/shared';
import { JSONStringify, JSONParse, ArrayIsArray, isObject } from '@locker/shared';

@@ -227,6 +227,11 @@ const ASTERISK_CHARACTER = '*';

function createLib(overrides) {
return ObjectAssign(ObjectCreate(null), baseLib, overrides);
return {
// @ts-ignore
__proto__: null,
...baseLib,
...overrides,
};
}
export { createLib };
/** version: 0.14.0 */
/** version: 0.14.1 */
{
"name": "@locker/ast-lib-maker",
"version": "0.14.0",
"version": "0.14.1",
"license": "Salesforce Developer Agreement",

@@ -24,3 +24,3 @@ "author": "Salesforce UI Security Team",

"dependencies": {
"@locker/shared": "0.14.0"
"@locker/shared": "0.14.1"
},

@@ -34,3 +34,3 @@ "devDependencies": {

],
"gitHead": "84e75917a650f22cfae11a07c632c61cbc4143b8"
"gitHead": "da64afc8a97a07eece6a0b6d33784b1d306d1ac1"
}

@@ -1,4 +0,29 @@

import { CreateLib } from './types';
export declare function createLib(overrides?: CreateLib.Overrides): any;
import { AST, CreateLib, Lib } from './types';
declare const baseLib: {
/**
* String patterns are converted to arrays and expanded for document and
* window aliases. For example:
* ```js
* ['window.top']
* ```
* expands to:
* ```js
* [
* ['window', 'top'],
* ['top'],
* ['document', 'defaultView', 'top'],
* ['frames', 'top'],
* ['globalThis', 'top'],
* ['self', 'top']
* ]
* ```
*/
expandPatterns(patterns: Lib.SearchPatternArray | Lib.SearchPatternArray[]): Lib.SearchPatternArray[];
getParentNode(node: AST.MaybeNode): AST.MaybeNode;
isNodeOfType(node: AST.MaybeNode, type: string): boolean;
match(identifier: AST.IdentifierOrThisExpression, patterns: Lib.SearchPatternArray[] | Lib.SearchPattern): Lib.MatchData | undefined;
matchAll(identifiers: AST.IdentifierOrThisExpression[], patterns: Lib.SearchPatternArray[] | Lib.SearchPattern): Lib.MatchData[];
};
export declare function createLib(overrides?: CreateLib.Overrides): typeof baseLib;
export * from './types';
//# sourceMappingURL=index.d.ts.map
import * as ESTree from 'estree';
interface MaybeParentExtension {
parent?: Node;
}
export declare namespace AST {
type IdentifierOrThisExpression = ESTree.Identifier | ESTree.ThisExpression;
type MaybeNode = ESTree.Node | undefined;
type Node = ESTree.Node & MaybeParentExtension;
type MaybeNode = Node | undefined;
}
export declare namespace CreateLib {
interface Overrides {
getParentNode?: Function;
isNodeOfType?: Function;
match?: Function;
getParentNode?: (node: AST.MaybeNode) => AST.MaybeNode;
isNodeOfType?: (node: AST.MaybeNode, type: string) => boolean;
match?: (identifier: AST.IdentifierOrThisExpression, patterns: Lib.SearchPatternArray[] | Lib.SearchPattern) => Lib.MatchData | undefined;
}

@@ -16,3 +20,3 @@ }

identifier: AST.IdentifierOrThisExpression;
node: ESTree.Node;
node: AST.Node;
pattern: SearchPatternString;

@@ -24,2 +28,3 @@ }

}
export {};
//# sourceMappingURL=types.d.ts.map

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