browser-extension-utils 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +14 -0
- package/package.json +2 -1
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function uniq(array: any[]): any[]
|
|
2
|
+
export function toCamelCase(text: string): string
|
|
3
|
+
export function querySelector(element, selectors?: string): HTMLElement
|
|
4
|
+
export function querySelectorAll(element, selectors?: string): any[]
|
|
5
|
+
export function $(element, selectors?: string): HTMLElement
|
|
6
|
+
export function $$(element, selectors?: string): any[]
|
|
7
|
+
export function createElement(type: string): HTMLElement
|
|
8
|
+
export function addEventListener(element, type, listener): void
|
|
9
|
+
export function setAttribute(element, attr, value): void
|
|
10
|
+
export function setStyle(element, style): void
|
|
11
|
+
export function toStyleMap(styleText: string): Record<string, unknown>
|
|
12
|
+
export function noStyleSpace(text: string): string
|
|
13
|
+
export function createSetStyle(styleText: string): setStyle
|
|
14
|
+
export function isUrl(text: string): boolean
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-extension-utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Utilities for developing browser extensions and userscripts",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
6
7
|
"exports": "./lib/index.js",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"p": "prettier --write .",
|