New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@garfish/utils

Package Overview
Dependencies
Maintainers
8
Versions
367
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@garfish/utils - npm Package Compare versions

Comparing version 0.1.5 to 0.1.8

dist/index.js

117

dist/index.d.ts

@@ -1,7 +0,110 @@

export * from './utils';
export * from './sentry';
export * from './domApis';
export * from './garfish';
export * from './mimeType';
export * from './container';
export * from './templateParse';
import { interfaces } from '@garfish/core';
declare const objectToString: () => string;
declare const noop: () => void;
declare function createKey(): string;
declare function isObject(val: any): boolean;
declare function isPlainObject(val: any): boolean;
declare function isPromise(obj: any): boolean;
declare function hasOwn(obj: any, key: PropertyKey): boolean;
declare function def(obj: Object, key: string, value: any): void;
declare function makeMap(list: Array<PropertyKey>): (val: any) => boolean;
declare function inBrowser(): boolean;
declare function warn(msg: string | Error): void;
declare function error(error: string | Error): void;
declare function validURL(str: any): boolean;
declare function internFunc(internalizeString: any): string;
declare function evalWithEnv(code: string, params: Record<string, any>): void;
declare function nextTick(cb: () => void): void;
declare function assert(condition: any, msg?: string | Error): void;
declare function toBoolean(val: any): boolean;
declare function remove<T>(list: Array<T> | Set<T>, el: T): boolean;
declare function callTestCallback(obj: any, ...args: any[]): void;
declare function unique<T>(list: Array<T>): T[];
declare function isPrimitive(val: any): boolean;
declare function deepMerge<K, T>(o: K, n: T, dp?: boolean): K & T;
declare function isAbsolute(url: string): boolean;
declare function transformUrl(resolvePath: string, curPath: string): string;
declare function findTarget(el: Element | ShadowRoot | Document, selectors: Array<string>): Element | ShadowRoot | Document;
declare function setDocCurrentScript(target: any, code: string, define?: boolean, url?: string, async?: boolean): () => void;
declare function __extends(d: any, b: any): void;
declare function isFunction(what: unknown): what is Function;
declare const hookObjectProperty: <T extends {}, K extends keyof T, P extends any[]>(obj: T, key: K, hookFunc: (origin: T[K], ...params: P) => T[K]) => (...params: P) => (strict?: boolean) => void;
interface StackFrame {
url: string;
func: string;
args: string[];
line: number | null;
column: number | null;
}
interface StackTrace {
name: string;
message: string;
mechanism?: string;
stack: StackFrame[];
failed?: boolean;
}
declare function computeStackTraceFromStackProp(ex: any): StackTrace | null;
declare const sourceListTags: string[];
declare const sourceNode: (val: any) => boolean;
declare function computeErrorUrl(ex: any): any;
declare function filterAndWrapEventListener(type: string, listener: EventListenerOrEventListenerObject, sourceList: Array<string>): EventListener;
interface Text {
content: string;
type: 'text' | 'comment';
}
interface Node {
key?: string;
type: 'element';
tagName: string;
children: Array<Node | Text>;
attributes: Array<Record<string, string | null>>;
}
declare type Attributes = Array<Record<string, string | null>>;
declare class DOMApis {
document: Document;
constructor(cusDocument?: Document);
isText(node: Node | Text): boolean;
isNode(node: Node | Text): boolean;
isCommentNode(node: Node | Text): boolean;
isCssLinkNode(node: Node): boolean;
isIconLinkNode(node: Node): boolean;
isPrefetchJsLinkNode(node: Node): boolean;
isRemoteModule(node: Node): boolean;
removeElement(el: Element): void;
createElement(node: Node): HTMLElement | SVGElement;
createTextNode(node: Text): globalThis.Text;
createStyleNode(content: string): HTMLStyleElement;
createLinkCommentNode(node: Node | string): string | Comment;
createScriptCommentNode(node: Node | {
code: string;
src?: string;
}): Comment;
applyAttributes(el: Element, attributes: Attributes): void;
}
declare const __GARFISH_FLAG__: unique symbol;
declare const __MockBody__ = "__garfishmockbody__";
declare const __MockHead__ = "__garfishmockhead__";
declare const __ELEMENT_DELETE_TAG__ = "__ELEMENT_DELETE_TAG__";
declare type mimeType = ReturnType<typeof parseContentType>;
declare function parseContentType(input: string): {
type: string;
subtype: string;
};
declare function isCss(mt: mimeType): boolean;
declare function isHtml(mt: mimeType): boolean;
declare function isJs(mt: mimeType): boolean;
declare function createAppContainer(name: string): {
htmlNode: HTMLDivElement;
appContainer: HTMLDivElement;
};
declare function getRenderNode(domGetter: interfaces.DomGetter): Promise<Element>;
declare function templateParse(code?: string, tags?: Array<string>): readonly [Node[], Record<string, Node[]>];
export { DOMApis, Node, StackFrame, StackTrace, Text, __ELEMENT_DELETE_TAG__, __GARFISH_FLAG__, __MockBody__, __MockHead__, __extends, assert, callTestCallback, computeErrorUrl, computeStackTraceFromStackProp, createAppContainer, createKey, deepMerge, def, error, evalWithEnv, filterAndWrapEventListener, findTarget, getRenderNode, hasOwn, hookObjectProperty, inBrowser, internFunc, isAbsolute, isCss, isFunction, isHtml, isJs, isObject, isPlainObject, isPrimitive, isPromise, makeMap, mimeType, nextTick, noop, objectToString, parseContentType, remove, setDocCurrentScript, sourceListTags, sourceNode, templateParse, toBoolean, transformUrl, unique, validURL, warn };

26

package.json
{
"name": "@garfish/utils",
"version": "0.1.5",
"version": "0.1.8",
"description": "utils module.",

@@ -12,4 +12,2 @@ "keywords": [

"license": "Apache-2.0",
"main": "index.js",
"module": "dist/utils.esm-bundler.js",
"repository": {

@@ -22,3 +20,11 @@ "type": "git",

},
"scripts": {},
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./*": "./*"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",

@@ -35,4 +41,4 @@ "buildOptions": {

},
"peerDependencies": {
"@garfish/core": "^0.0.23"
"dependencies": {
"@garfish/core": "0.1.8"
},

@@ -43,3 +49,7 @@ "publishConfig": {

},
"gitHead": "f167c7b8f0d6c11a387709b7015bc0c6f84991d3"
}
"gitHead": "e8bf48ea8ca8db408a4a0a1cdab8ce4a50ab279b",
"scripts": {
"build": "rimraf dist && tsup src/index.ts",
"dev": "cross-env WATCH=true tsup src/index.ts"
}
}
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