@lowerdeck/unique 1.0.3 → 1.0.4

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.cjs ADDED
@@ -0,0 +1,2 @@
1
+ exports.unique=function(n){return[].concat(new Set(n))};
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["export let unique = <T>(arr: T[]) => [...new Set(arr)];\n"],"names":["arr","concat","Set"],"mappings":"eAAoB,SAAIA,GAAQC,MAAAA,GAAAA,OAAS,IAAIC,IAAIF,GAAK"}
@@ -0,0 +1,2 @@
1
+ export declare let unique: <T>(arr: T[]) => T[];
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,MAAM,GAAI,CAAC,EAAE,KAAK,CAAC,EAAE,QAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ var n=function(n){return[].concat(new Set(n))};export{n as unique};
2
+ //# sourceMappingURL=index.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.js","sources":["../src/index.ts"],"sourcesContent":["export let unique = <T>(arr: T[]) => [...new Set(arr)];\n"],"names":["unique","arr","concat","Set"],"mappings":"AAAW,IAAAA,EAAS,SAAIC,GAAQC,MAAAA,GAAAA,OAAS,IAAIC,IAAIF,GAAK"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e||self).unique={})}(this,function(e){e.unique=function(e){return[].concat(new Set(e))}});
2
+ //# sourceMappingURL=index.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["export let unique = <T>(arr: T[]) => [...new Set(arr)];\n"],"names":["arr","concat","Set"],"mappings":"yOAAoB,SAAIA,GAAQC,MAAAA,GAAAA,OAAS,IAAIC,IAAIF,GAAK"}
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "@lowerdeck/unique",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
+ "files": [
8
+ "src/**",
9
+ "dist/**",
10
+ "README.md",
11
+ "package.json"
12
+ ],
7
13
  "author": "Tobias Herber",
8
14
  "license": "Apache 2",
9
15
  "type": "module",
@@ -21,12 +27,12 @@
21
27
  "scripts": {
22
28
  "test": "vitest run --passWithNoTests",
23
29
  "lint": "prettier src/**/*.ts --check",
24
- "build": "microbundle"
30
+ "build": "rm -rf ./dist && microbundle"
25
31
  },
26
32
  "dependencies": {},
27
33
  "devDependencies": {
28
34
  "microbundle": "^0.15.1",
29
- "@lowerdeck/tsconfig": "^1.0.0",
35
+ "@lowerdeck/tsconfig": "^1.0.1",
30
36
  "typescript": "^5.8.3",
31
37
  "vitest": "^3.1.2"
32
38
  }
@@ -1,11 +0,0 @@
1
-
2
- $ microbundle
3
- Build "@lowerdeck/unique" to dist:
4
- 77 B: index.cjs.gz
5
- 58 B: index.cjs.br
6
- 66 B: index.module.js.gz
7
- 50 B: index.module.js.br
8
- 88 B: index.module.js.gz
9
- 72 B: index.module.js.br
10
- 170 B: index.umd.js.gz
11
- 137 B: index.umd.js.br
@@ -1,26 +0,0 @@
1
-
2
- $ vitest run --passWithNoTests
3
- [?25l
4
-  RUN  v3.2.4 /Users/tobias/code/metorial/metorial-enterprise/oss/src/packages/shared/unique
5
-
6
- [?2026h
7
-  ❯ src/index.test.ts [queued]
8
-
9
-  Test Files 0 passed (1)
10
-  Tests 0 passed (0)
11
-  Start at 10:23:39
12
-  Duration 101ms
13
- [?2026l ✓ src/index.test.ts (6 tests) 2ms
14
- ✓ unique > should return an array with unique elements 1ms
15
- ✓ unique > should handle an empty array 0ms
16
- ✓ unique > should handle an array with all unique elements 0ms
17
- ✓ unique > should handle an array with all duplicate elements 0ms
18
- ✓ unique > should work with strings 0ms
19
- ✓ unique > should work with mixed types 0ms
20
-
21
-  Test Files  1 passed (1)
22
-  Tests  6 passed (6)
23
-  Start at  10:23:39
24
-  Duration  218ms (transform 29ms, setup 0ms, collect 28ms, tests 2ms, environment 0ms, prepare 40ms)
25
-
26
- [?25h
package/CHANGELOG.md DELETED
@@ -1,19 +0,0 @@
1
- # @lowerdeck/unique
2
-
3
- ## 1.0.3
4
-
5
- ### Patch Changes
6
-
7
- - Fix default entry point
8
-
9
- ## 1.0.2
10
-
11
- ### Patch Changes
12
-
13
- - update versions
14
-
15
- ## 1.0.1
16
-
17
- ### Patch Changes
18
-
19
- - Fix exports
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "@lowerdeck/tsconfig/base.json",
4
- "exclude": [
5
- "dist"
6
- ],
7
- "include": [
8
- "src"
9
- ],
10
- "compilerOptions": {
11
- "outDir": "dist"
12
- }
13
- }