@chocbite/ts-lib-polyfill 1.0.0
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/dist/index.d.mts +2 -0
- package/dist/index.mjs +8 -0
- package/package.json +43 -0
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
//#region src/replace_children.ts
|
|
3
|
+
if (!Element.prototype.replaceChildren) Element.prototype.replaceChildren = function(...new_children) {
|
|
4
|
+
this.textContent = "";
|
|
5
|
+
if (new_children.length) this.append(...new_children);
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chocbite/ts-lib-polyfill",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Polyfill library for TypeScript",
|
|
5
|
+
"author": "chocolateandmilkwin",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"private": false,
|
|
9
|
+
"module": "./dist/index.mjs",
|
|
10
|
+
"types": "./dist/index.d.mts",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"types": "./dist/index.d.mts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"dev": "vite --port 9952",
|
|
25
|
+
"build": "tsdown src/index.ts",
|
|
26
|
+
"lint": "eslint src/**/*.ts",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"check-deps": "npx depcheck",
|
|
29
|
+
"check-trials": "tsc --noEmit",
|
|
30
|
+
"prepublishOnly": "npm run check-deps && npm run check-trials && npm run build",
|
|
31
|
+
"upgrades": "npx npm-check-updates --target semver",
|
|
32
|
+
"upgrade": "npx npm-check-updates --target semver -u && npm install"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@chocbite/ts-supplement-eslint": "^1.0.3",
|
|
36
|
+
"typescript": "^6.0.3",
|
|
37
|
+
"tsdown": "^0.21.10",
|
|
38
|
+
"vite": "^8.1.0",
|
|
39
|
+
"vitest": "^4.1.9",
|
|
40
|
+
"eslint": "^10.5.0",
|
|
41
|
+
"@vitest/browser-playwright": "^4.1.9"
|
|
42
|
+
}
|
|
43
|
+
}
|