uti 8.3.1 → 8.3.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/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![npm](https://img.shields.io/npm/v/uti.svg)](https://www.npmjs.com/package/uti)
2
2
  [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
3
+ [![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\&label\&labelColor=blue\&color=555555)](https://typescriptlang.org)
3
4
  [![bundlejs](https://deno.bundlejs.com/?q=uti\&badge=detailed)](https://bundlejs.com/?q=uti)
4
5
  [![downloads](http://img.shields.io/npm/dm/uti.svg?style=flat-square)](https://npmjs.org/package/uti)
5
6
  [![GitHub Issues](https://img.shields.io/github/issues/arlac77/uti.svg?style=flat-square)](https://github.com/arlac77/uti/issues)
@@ -54,6 +55,8 @@ public.plain-text
54
55
  * [toJSON](#tojson)
55
56
  * [UTIController](#uticontroller)
56
57
  * [Properties](#properties-1)
58
+ * [utiByMimeType](#utibymimetype)
59
+ * [utiByFileNameExtension](#utibyfilenameextension)
57
60
  * [register](#register)
58
61
  * [Parameters](#parameters-2)
59
62
  * [getUTI](#getuti)
@@ -115,6 +118,14 @@ Registry of UTIs.
115
118
  * `utiByMimeType` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [UTI](#uti)>**&#x20;
116
119
  * `utiByFileNameExtension` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [UTI](#uti)>**&#x20;
117
120
 
121
+ ### utiByMimeType
122
+
123
+ Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>>
124
+
125
+ ### utiByFileNameExtension
126
+
127
+ Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>>
128
+
118
129
  ### register
119
130
 
120
131
  Registers additional types.
@@ -131,7 +142,7 @@ Lookup a given UTI.
131
142
 
132
143
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** UTI
133
144
 
134
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** UTI for the given name or undefined if UTI is not present.
145
+ Returns **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** UTI for the given name or undefined if UTI is not present.
135
146
 
136
147
  ### getUTIsForMimeType
137
148
 
@@ -141,7 +152,7 @@ Lookup a UTIs for a mime type.
141
152
 
142
153
  * `mimeType` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** mime type to get UTIs for
143
154
 
144
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** UTI for the given mime type or undefined if no UTI is registerd for the mime type
155
+ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTIs for the given mime type
145
156
 
146
157
  ### getUTIsForFileName
147
158
 
@@ -153,7 +164,7 @@ Then a lookup in the reistered UTIs for file name extions is executed.
153
164
 
154
165
  * `fileName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** file to detect UTI for
155
166
 
156
- Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTI for the given fileName or undefined if no UTI is registerd for the file names extension
167
+ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** UTIs for the given fileName
157
168
 
158
169
  ### conformsTo
159
170
 
package/package.json CHANGED
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "uti",
3
- "version": "8.3.1",
3
+ "version": "8.3.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
7
7
  },
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/uti.d.mts",
10
+ "types": "./types/uti.d.mts",
11
11
  "default": "./src/uti.mjs"
12
12
  }
13
13
  },
14
+ "types": "./types/uti.d.mts",
14
15
  "description": "javascript implementation of a \"Uniform Type Identifier\" (UTI)",
15
16
  "keywords": [
16
17
  "MIME",
@@ -25,7 +26,7 @@
25
26
  ],
26
27
  "license": "BSD-2-Clause",
27
28
  "scripts": {
28
- "prepare": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir dist -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
29
+ "prepare": "tsc --allowJs --declaration --emitDeclarationOnly --declarationDir types -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs",
29
30
  "test": "npm run test:browser-ava && npm run test:ava",
30
31
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
31
32
  "test:browser-ava": "browser-ava --headless --no-keep-open tests/*-ava.mjs tests/*-ava-browser.mjs",
@@ -37,7 +38,7 @@
37
38
  },
38
39
  "devDependencies": {
39
40
  "ava": "^6.1.1",
40
- "browser-ava": "^2.1.12",
41
+ "browser-ava": "^2.2.0",
41
42
  "c8": "^9.1.0",
42
43
  "documentation": "^14.0.3",
43
44
  "semantic-release": "^23.0.2",
File without changes
File without changes