@nxtedition/mime 1.0.4 → 1.1.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/lib/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export declare function lookup(name: string): string | null;
2
+ export { lookup as getType };
2
3
  export declare function extension(mimeType: string): string | null;
4
+ export { extension as getExtension };
package/lib/index.js CHANGED
@@ -37,6 +37,35 @@ const EXT_TO_MIME = {
37
37
  ass: 'text/x-ass',
38
38
  ssa: 'text/x-ssa',
39
39
 
40
+ // Camera RAW
41
+ cr2: 'image/x-canon-cr2',
42
+ nef: 'image/x-nikon-nef',
43
+ cr3: 'image/x-canon-cr3',
44
+ nrw: 'image/x-nikon-nrw',
45
+ arw: 'image/x-sony-arw',
46
+ srf: 'image/x-sony-srf',
47
+ sr2: 'image/x-sony-sr2',
48
+ raf: 'image/x-fujifilm-raf',
49
+ rw2: 'image/x-panasonic-rw2',
50
+ orf: 'image/x-olympus-orf',
51
+ pef: 'image/x-pentax-pef',
52
+ ptx: 'image/x-pentax-ptx',
53
+ x3f: 'image/x-sigma-x3f',
54
+ '3fr': 'image/x-hasselblad-3fr',
55
+ fff: 'image/x-hasselblad-fff',
56
+ iiq: 'image/x-phase-one-iiq',
57
+ mrw: 'image/x-minolta-mrw',
58
+ mef: 'image/x-mamiya-mef',
59
+ dng: 'image/x-adobe-dng',
60
+ raw: 'image/x-raw',
61
+ rwl: 'image/x-leica-rwl',
62
+ k25: 'image/x-kodak-k25',
63
+ kdc: 'image/x-kodak-kdc',
64
+ bay: 'image/x-casio-bay',
65
+ erf: 'image/x-epson-erf',
66
+ srw: 'image/x-samsung-srw',
67
+ mos: 'image/x-leaf-mos',
68
+
40
69
  // Imaging
41
70
  exr: 'image/x-exr',
42
71
  cin: 'image/x-cin',
@@ -87,6 +116,35 @@ const MIME_TO_EXT = {
87
116
  'text/x-ass': 'ass',
88
117
  'text/x-ssa': 'ssa',
89
118
 
119
+ // Camera RAW
120
+ 'image/x-nikon-nef': 'nef',
121
+ 'image/x-canon-cr2': 'cr2',
122
+ 'image/x-canon-cr3': 'cr3',
123
+ 'image/x-nikon-nrw': 'nrw',
124
+ 'image/x-sony-arw': 'arw',
125
+ 'image/x-sony-srf': 'srf',
126
+ 'image/x-sony-sr2': 'sr2',
127
+ 'image/x-fujifilm-raf': 'raf',
128
+ 'image/x-panasonic-rw2': 'rw2',
129
+ 'image/x-olympus-orf': 'orf',
130
+ 'image/x-pentax-pef': 'pef',
131
+ 'image/x-pentax-ptx': 'ptx',
132
+ 'image/x-sigma-x3f': 'x3f',
133
+ 'image/x-hasselblad-3fr': '3fr',
134
+ 'image/x-hasselblad-fff': 'fff',
135
+ 'image/x-phase-one-iiq': 'iiq',
136
+ 'image/x-minolta-mrw': 'mrw',
137
+ 'image/x-mamiya-mef': 'mef',
138
+ 'image/x-adobe-dng': 'dng',
139
+ 'image/x-raw': 'raw',
140
+ 'image/x-leica-rwl': 'rwl',
141
+ 'image/x-kodak-k25': 'k25',
142
+ 'image/x-kodak-kdc': 'kdc',
143
+ 'image/x-casio-bay': 'bay',
144
+ 'image/x-epson-erf': 'erf',
145
+ 'image/x-samsung-srw': 'srw',
146
+ 'image/x-leaf-mos': 'mos',
147
+
90
148
  // Imaging
91
149
  'image/x-exr': 'exr',
92
150
  'image/x-cin': 'cin',
@@ -113,6 +171,8 @@ export function lookup(name ) {
113
171
  return mime.getType(name)
114
172
  }
115
173
 
174
+ export { lookup as getType }
175
+
116
176
  export function extension(mimeType ) {
117
177
  if (typeof mimeType !== 'string' || mimeType.length === 0) {
118
178
  return null
@@ -124,3 +184,5 @@ export function extension(mimeType ) {
124
184
 
125
185
  return mime.getExtension(mimeType) || null
126
186
  }
187
+
188
+ export { extension as getExtension }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/mime",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -30,5 +30,5 @@
30
30
  "rimraf": "^6.1.3",
31
31
  "typescript": "^5.9.3"
32
32
  },
33
- "gitHead": "c9b449408262ca9431467193d624f1a043d669bb"
33
+ "gitHead": "733dcb203c07da0f564ad4626228c3da556c27b2"
34
34
  }