@sequencemedia/dupe 0.0.56 → 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/index.d.mts +10 -0
- package/package.json +5 -4
- package/src/index.d.mts +4 -4
- package/src/index.mjs +4 -4
- package/src/node/index.d.mts +4 -4
- package/src/node/index.mjs +4 -4
package/index.d.mts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
namespace DupeTypes {
|
|
3
|
+
export type ArrayLiteralType = unknown[] | never[]
|
|
4
|
+
export type ObjectLiteralType = Record<PropertyKey, unknown> | Record<PropertyKey, never>
|
|
5
|
+
export type ValueType = string | number | ArrayLiteralType | ObjectLiteralType | Buffer | null | undefined
|
|
6
|
+
export type WeakMapType = WeakMap<WeakKey, ArrayLiteralType | ObjectLiteralType>
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/dupe",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"dupe",
|
|
6
6
|
"duplicate",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"main": "./src/index.mjs",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"types": "./
|
|
14
|
+
"types": "./index.d.mts",
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "Jonathan Perry for Sequence Media Limited",
|
|
17
17
|
"email": "sequencemedia@sequencemedia.net",
|
|
@@ -30,8 +30,9 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.26.9",
|
|
32
32
|
"@babel/preset-env": "^7.26.9",
|
|
33
|
-
"@sequencemedia/eslint-config-standard": "^0.2.
|
|
34
|
-
"@sequencemedia/eslint-config-typescript": "^0.1.
|
|
33
|
+
"@sequencemedia/eslint-config-standard": "^0.2.34",
|
|
34
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.47",
|
|
35
|
+
"@types/chai": "^5.0.1",
|
|
35
36
|
"@types/debug": "^4.1.12",
|
|
36
37
|
"@types/mocha": "^10.0.10",
|
|
37
38
|
"@types/node": "^22.13.5",
|
package/src/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type ArrayLiteralType =
|
|
2
|
-
export type ObjectLiteralType =
|
|
3
|
-
export type ValueType =
|
|
4
|
-
export type WeakMapType =
|
|
1
|
+
export type ArrayLiteralType = DupeTypes.ArrayLiteralType
|
|
2
|
+
export type ObjectLiteralType = DupeTypes.ObjectLiteralType
|
|
3
|
+
export type ValueType = DupeTypes.ValueType
|
|
4
|
+
export type WeakMapType = DupeTypes.WeakMapType
|
|
5
5
|
|
|
6
6
|
export default function toDuplicate (v: ValueType | ValueType[]): ValueType | ValueType[]
|
package/src/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {
|
|
3
|
-
* @typedef {
|
|
4
|
-
* @typedef {
|
|
5
|
-
* @typedef {
|
|
2
|
+
* @typedef {DupeTypes.ArrayLiteralType} ArrayLiteralType
|
|
3
|
+
* @typedef {DupeTypes.ObjectLiteralType} ObjectLiteralType
|
|
4
|
+
* @typedef {DupeTypes.ValueType} ValueType
|
|
5
|
+
* @typedef {DupeTypes.WeakMapType} WeakMapType
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
package/src/node/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type ArrayLiteralType =
|
|
2
|
-
export type ObjectLiteralType =
|
|
3
|
-
export type ValueType =
|
|
4
|
-
export type WeakMapType =
|
|
1
|
+
export type ArrayLiteralType = DupeTypes.ArrayLiteralType
|
|
2
|
+
export type ObjectLiteralType = DupeTypes.ObjectLiteralType
|
|
3
|
+
export type ValueType = DupeTypes.ValueType
|
|
4
|
+
export type WeakMapType = DupeTypes.WeakMapType
|
|
5
5
|
|
|
6
6
|
export default function toDuplicate (v: ValueType | ValueType[]): ValueType | ValueType[]
|
package/src/node/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {
|
|
3
|
-
* @typedef {
|
|
4
|
-
* @typedef {
|
|
5
|
-
* @typedef {
|
|
2
|
+
* @typedef {DupeTypes.ArrayLiteralType} ArrayLiteralType
|
|
3
|
+
* @typedef {DupeTypes.ObjectLiteralType} ObjectLiteralType
|
|
4
|
+
* @typedef {DupeTypes.ValueType} ValueType
|
|
5
|
+
* @typedef {DupeTypes.WeakMapType} WeakMapType
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|