charcode-is-valid-xml-name-character 2.0.5 → 2.0.6

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,7 +1,7 @@
1
1
  /**
2
2
  * @name charcode-is-valid-xml-name-character
3
3
  * @fileoverview Does a given character belong to XML spec's "Production 4 OR 4a" type (is acceptable for XML element's name)
4
- * @version 2.0.5
4
+ * @version 2.0.6
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/charcode-is-valid-xml-name-character/}
@@ -9,21 +9,60 @@
9
9
 
10
10
  import { isIndexWithin } from 'ranges-is-index-within';
11
11
 
12
- const nameStartChar = [[58, 58], [65, 90], [95, 95], [192, 214], [216, 246], [248, 767], [880, 893], [895, 8191], [8204, 8205], [8304, 8591], [11264, 12271], [12289, 55295], [63744, 64975], [65008, 65533], [65536, 983039]
12
+ const nameStartChar = [
13
+ [58, 58],
14
+ [65, 90],
15
+ [95, 95],
16
+ [192, 214],
17
+ [216, 246],
18
+ [248, 767],
19
+ [880, 893],
20
+ [895, 8191],
21
+ [8204, 8205],
22
+ [8304, 8591],
23
+ [11264, 12271],
24
+ [12289, 55295],
25
+ [63744, 64975],
26
+ [65008, 65533],
27
+ [65536, 983039],
13
28
  ];
14
- const nameChar = [[45, 45], [46, 46], [48, 57], [58, 58], [65, 90], [95, 95], [183, 183], [192, 214], [216, 246], [248, 767], [768, 879], [880, 893], [895, 8191], [8204, 8205], [8255, 8256], [8304, 8591], [11264, 12271], [12289, 55295], [63744, 64975], [65008, 65533], [65536, 983039]
29
+ const nameChar = [
30
+ [45, 45],
31
+ [46, 46],
32
+ [48, 57],
33
+ [58, 58],
34
+ [65, 90],
35
+ [95, 95],
36
+ [183, 183],
37
+ [192, 214],
38
+ [216, 246],
39
+ [248, 767],
40
+ [768, 879],
41
+ [880, 893],
42
+ [895, 8191],
43
+ [8204, 8205],
44
+ [8255, 8256],
45
+ [8304, 8591],
46
+ [11264, 12271],
47
+ [12289, 55295],
48
+ [63744, 64975],
49
+ [65008, 65533],
50
+ [65536, 983039],
15
51
  ];
16
- const priorityNameChar = [[97, 122]
52
+ const priorityNameChar = [
53
+ [97, 122],
17
54
  ];
18
55
  const opts = {
19
- inclusiveRangeEnds: true,
20
- skipIncomingRangeSorting: true
56
+ inclusiveRangeEnds: true,
57
+ skipIncomingRangeSorting: true,
21
58
  };
22
59
  function isProduction4(char) {
23
- return isIndexWithin(char.codePointAt(0), priorityNameChar, opts) || isIndexWithin(char.codePointAt(0), nameStartChar, opts);
60
+ return (isIndexWithin(char.codePointAt(0), priorityNameChar, opts) ||
61
+ isIndexWithin(char.codePointAt(0), nameStartChar, opts));
24
62
  }
25
63
  function isProduction4a(char) {
26
- return isIndexWithin(char.codePointAt(0), priorityNameChar, opts) || isIndexWithin(char.codePointAt(0), nameChar, opts);
64
+ return (isIndexWithin(char.codePointAt(0), priorityNameChar, opts) ||
65
+ isIndexWithin(char.codePointAt(0), nameChar, opts));
27
66
  }
28
67
 
29
68
  export { isProduction4, isProduction4a, isProduction4 as validFirstChar, isProduction4a as validSecondCharOnwards };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name charcode-is-valid-xml-name-character
3
3
  * @fileoverview Does a given character belong to XML spec's "Production 4 OR 4a" type (is acceptable for XML element's name)
4
- * @version 2.0.5
4
+ * @version 2.0.6
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/charcode-is-valid-xml-name-character/}
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * @name ranges-is-index-within
13
13
  * @fileoverview Checks if index is within any of the given string index ranges
14
- * @version 3.0.5
14
+ * @version 3.0.6
15
15
  * @author Roy Revelt, Codsen Ltd
16
16
  * @license MIT
17
17
  * {@link https://codsen.com/os/ranges-is-index-within/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "charcode-is-valid-xml-name-character",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Does a given character belong to XML spec's \"Production 4 OR 4a\" type (is acceptable for XML element's name)",
5
5
  "keywords": [
6
6
  "4",
@@ -39,13 +39,12 @@
39
39
  "types": "types/index.d.ts",
40
40
  "scripts": {
41
41
  "build": "rollup -c",
42
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
43
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
42
+ "build:esbuild": "node '../../scripts/esbuild.js'",
43
+ "build:esbuild:dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
44
+ "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent",
44
45
  "clean_types": "../../scripts/cleanTypes.js",
45
46
  "dev": "rollup -c --dev",
46
47
  "devunittest": "npm run dev && tap --only -R 'base'",
47
- "esbuild": "node '../../scripts/esbuild.js'",
48
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
49
48
  "format": "npm run lect && npm run prettier && npm run lint",
50
49
  "lect": "lect",
51
50
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -54,17 +53,14 @@
54
53
  "republish": "npm publish || :",
55
54
  "tap": "tap",
56
55
  "pretest": "npm run build",
57
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
56
+ "test": "npm run test:ci && npm run perf",
57
+ "test:ci": "npm run unittest && npm run test:examples && npm run format",
58
58
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
59
59
  "tsc": "tsc",
60
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
60
+ "unittest": "tap --no-only --reporter=terse && tsc -p tsconfig.json --noEmit"
61
61
  },
62
62
  "tap": {
63
63
  "check-coverage": false,
64
- "coverage-report": [
65
- "json-summary",
66
- "text"
67
- ],
68
64
  "node-arg": [
69
65
  "--no-warnings",
70
66
  "--experimental-loader",
@@ -84,8 +80,8 @@
84
80
  }
85
81
  },
86
82
  "dependencies": {
87
- "@babel/runtime": "^7.16.0",
88
- "ranges-is-index-within": "^3.0.5"
83
+ "@babel/runtime": "^7.16.3",
84
+ "ranges-is-index-within": "^3.0.6"
89
85
  },
90
86
  "devDependencies": {
91
87
  "@babel/cli": "^7.16.0",
@@ -96,8 +92,8 @@
96
92
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
97
93
  "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
98
94
  "@babel/plugin-proposal-optional-chaining": "^7.16.0",
99
- "@babel/plugin-transform-runtime": "^7.16.0",
100
- "@babel/preset-env": "^7.16.0",
95
+ "@babel/plugin-transform-runtime": "^7.16.4",
96
+ "@babel/preset-env": "^7.16.4",
101
97
  "@babel/preset-typescript": "^7.16.0",
102
98
  "@babel/register": "^7.16.0",
103
99
  "@istanbuljs/esm-loader-hook": "^0.1.2",
@@ -106,25 +102,25 @@
106
102
  "@rollup/plugin-node-resolve": "^13.0.6",
107
103
  "@rollup/plugin-strip": "^2.1.0",
108
104
  "@rollup/plugin-typescript": "^8.3.0",
109
- "@types/node": "^16.11.6",
105
+ "@types/node": "^16.11.9",
110
106
  "@types/tap": "^15.0.5",
111
- "@typescript-eslint/eslint-plugin": "^5.3.0",
112
- "@typescript-eslint/parser": "^5.3.0",
107
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
108
+ "@typescript-eslint/parser": "^5.4.0",
113
109
  "core-js": "^3.19.1",
114
110
  "cross-env": "^7.0.3",
115
- "eslint": "^8.2.0",
116
- "lect": "^0.18.5",
117
- "rollup": "^2.59.0",
111
+ "eslint": "^8.3.0",
112
+ "lect": "^0.18.6",
113
+ "rollup": "^2.60.0",
118
114
  "rollup-plugin-ascii": "^0.0.3",
119
115
  "rollup-plugin-banner": "^0.2.1",
120
116
  "rollup-plugin-cleanup": "^3.2.1",
121
117
  "rollup-plugin-dts": "^4.0.1",
122
118
  "rollup-plugin-terser": "^7.0.2",
123
- "tap": "^15.0.10",
119
+ "tap": "^15.1.2",
124
120
  "tslib": "^2.3.1",
125
- "typescript": "^4.4.4"
121
+ "typescript": "^4.5.2"
126
122
  },
127
123
  "engines": {
128
- "node": ">=12"
124
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
129
125
  }
130
126
  }