parse-accept-language 2.1.1 → 3.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.
@@ -1,5 +1,4 @@
1
- module.exports = parse;
2
- module.exports.toArray = str2array;
1
+ export { str2array as toArray };
3
2
 
4
3
  function parseTag(tag) {
5
4
  tag = tag.split(';');
@@ -35,7 +34,7 @@ function str2array(acceptLanguage = '') {
35
34
  }
36
35
 
37
36
  // parse Accept-Language header with memoization
38
- function parse(req) {
37
+ export default function parse(req) {
39
38
  if (req._parsedAcceptLanguage) {
40
39
  return req._parsedAcceptLanguage;
41
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse-accept-language",
3
- "version": "2.1.1",
3
+ "version": "3.0.0",
4
4
  "description": "Parse 'Accept-Language' header and cache the result in request.",
5
5
  "author": {
6
6
  "name": "Damian Krzeminski",
@@ -11,6 +11,8 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/pirxpilot/parse-accept-language.git"
13
13
  },
14
+ "type": "module",
15
+ "exports": "./lib/parse-accept-language.js",
14
16
  "license": "MIT",
15
17
  "keywords": [
16
18
  "parse-accept-language",
@@ -19,15 +21,13 @@
19
21
  "i18n",
20
22
  "l10n"
21
23
  ],
22
- "dependencies": {},
23
24
  "devDependencies": {
24
- "@biomejs/biome": "^1.9.4"
25
+ "@biomejs/biome": "2.3.10"
25
26
  },
26
27
  "scripts": {
27
28
  "test": "make check"
28
29
  },
29
30
  "files": [
30
- "index.js",
31
31
  "lib"
32
32
  ]
33
33
  }
package/index.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./lib/parse-accept-language');