foxts 3.14.0 → 3.15.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/empty-node.d.ts +7 -4
- package/dist/empty-node.js +1 -1
- package/dist/empty-node.mjs +1 -1
- package/dist/is-function.d.ts +4 -0
- package/dist/is-function.js +1 -0
- package/dist/is-function.mjs +1 -0
- package/package.json +11 -5
package/dist/empty-node.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* if you are trying to empty an Element, use `emptyElement` method instead, it will opt-in more performant method on modern browsers.
|
|
3
|
+
*/
|
|
4
|
+
declare function emptyNode(node: Node): void;
|
|
5
|
+
declare function emptyElementModern(element: Element): void;
|
|
3
6
|
/**
|
|
4
7
|
* Use `Element.replaceChildren` if available, otherwise fall back to removing each child node.
|
|
5
8
|
*/
|
|
6
|
-
declare const
|
|
9
|
+
declare const emptyElement: (element: Element) => void;
|
|
7
10
|
|
|
8
|
-
export {
|
|
11
|
+
export { emptyElement, emptyElementModern, emptyNode };
|
package/dist/empty-node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}Object.defineProperty(exports,"__esModule",{value:!0});let
|
|
1
|
+
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}Object.defineProperty(exports,"__esModule",{value:!0});let l="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;exports.emptyElement=l,exports.emptyElementModern=t,exports.emptyNode=e;
|
package/dist/empty-node.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}let n="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;export{n as
|
|
1
|
+
function e(e){for(;e.firstChild;)e.removeChild(e.lastChild)}function t(e){e.replaceChildren()}let n="undefined"!=typeof Element&&"replaceChildren"in Element.prototype?t:e;export{n as emptyElement,t as emptyElementModern,e as emptyNode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.isFunction=e=>"function"==typeof e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=t=>"function"==typeof t;export{t as isFunction};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foxts",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Opinionated collection of common TypeScript utils by @SukkaW",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/SukkaW/foxts"
|
|
@@ -254,6 +254,12 @@
|
|
|
254
254
|
"import": "./dist/empty-node.mjs",
|
|
255
255
|
"require": "./dist/empty-node.js",
|
|
256
256
|
"default": "./dist/empty-node.js"
|
|
257
|
+
},
|
|
258
|
+
"./is-function": {
|
|
259
|
+
"types": "./dist/is-function.d.ts",
|
|
260
|
+
"import": "./dist/is-function.mjs",
|
|
261
|
+
"require": "./dist/is-function.js",
|
|
262
|
+
"default": "./dist/is-function.js"
|
|
257
263
|
}
|
|
258
264
|
},
|
|
259
265
|
"sideEffects": false,
|
|
@@ -269,7 +275,7 @@
|
|
|
269
275
|
"fast-escape-regexp": "^1.0.1"
|
|
270
276
|
},
|
|
271
277
|
"devDependencies": {
|
|
272
|
-
"@eslint-sukka/node": "^7.1
|
|
278
|
+
"@eslint-sukka/node": "^7.2.1",
|
|
273
279
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
274
280
|
"@mitata/counters": "^0.0.8",
|
|
275
281
|
"@monyone/aho-corasick": "^1.0.4",
|
|
@@ -283,9 +289,9 @@
|
|
|
283
289
|
"bunchee": "^6.6.0",
|
|
284
290
|
"devalue": "^5.3.2",
|
|
285
291
|
"eslint": "^9.36.0",
|
|
286
|
-
"eslint-config-sukka": "^7.1
|
|
287
|
-
"eslint-formatter-sukka": "^7.1
|
|
288
|
-
"expect": "^30.
|
|
292
|
+
"eslint-config-sukka": "^7.2.1",
|
|
293
|
+
"eslint-formatter-sukka": "^7.2.1",
|
|
294
|
+
"expect": "^30.2.0",
|
|
289
295
|
"fastscan": "^1.0.6",
|
|
290
296
|
"fdir": "^6.5.0",
|
|
291
297
|
"mitata": "^1.0.34",
|