charcode-is-valid-xml-name-character 2.0.10 → 2.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 2.1.0 (2022-04-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- export defaults and version ([1107244](https://github.com/codsen/codsen/commit/1107244b45eff96ac1fc4ab992031ede0d10ba8c))
|
|
11
|
+
|
|
6
12
|
## 2.0.0 (2021-09-09)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/README.md
CHANGED
|
@@ -26,14 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
|
-
This package is ESM
|
|
29
|
+
This package is [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you're not ready yet, install an older version of this program, 1.13.0 (`npm i charcode-is-valid-xml-name-character@1.13.0`).
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm i charcode-is-valid-xml-name-character
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
If you need a legacy version which works with `require`, use version 1.13.0
|
|
36
|
-
|
|
37
35
|
## Quick Take
|
|
38
36
|
|
|
39
37
|
```js
|
|
@@ -73,8 +71,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
73
71
|
|
|
74
72
|
MIT License
|
|
75
73
|
|
|
76
|
-
Copyright (c) 2010-
|
|
77
|
-
|
|
74
|
+
Copyright (c) 2010-2022 Roy Revelt and other contributors
|
|
78
75
|
|
|
79
76
|
<img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
|
|
80
|
-
|
|
@@ -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
|
|
4
|
+
* @version 2.1.0
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/charcode-is-valid-xml-name-character/}
|
|
@@ -1,17 +1,17 @@
|
|
|
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
|
|
4
|
+
* @version 2.1.0
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/charcode-is-valid-xml-name-character/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var charcodeIsValidXmlNameCharacter=(()=>{var
|
|
10
|
+
var charcodeIsValidXmlNameCharacter=(()=>{var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var c=(n,e,r)=>e in n?t(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,u=(n,e)=>{for(var r in e||(e={}))g.call(e,r)&&c(n,r,e[r]);if(d)for(var r of d(e))f.call(e,r)&&c(n,r,e[r]);return n};var p=(n,e)=>{for(var r in e)t(n,r,{get:e[r],enumerable:!0})},R=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of b(e))!g.call(n,a)&&a!==r&&t(n,a,{get:()=>e[a],enumerable:!(o=l(e,a))||o.enumerable});return n};var h=n=>R(t({},"__esModule",{value:!0}),n);var P={};p(P,{isProduction4:()=>x,isProduction4a:()=>A,validFirstChar:()=>x,validSecondCharOnwards:()=>A});var v={inclusiveRangeEnds:!1,returnMatchedRangeInsteadOfTrue:!1};function s(n,e,r){let o=u(u({},v),r);if(!Number.isInteger(n))throw new Error(`ranges-is-index-within: [THROW_ID_01] the first input argument should be string index, a natural number (or zero). It was given as ${n} (type ${typeof n})`);return Array.isArray(e)?o.returnMatchedRangeInsteadOfTrue?e.find(a=>o.inclusiveRangeEnds?n>=a[0]&&n<=a[1]:n>a[0]&&n<a[1])||!1:e.some(a=>o.inclusiveRangeEnds?n>=a[0]&&n<=a[1]:n>a[0]&&n<a[1]):!1}var I=[[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]],y=[[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]],m=[[97,122]],i={inclusiveRangeEnds:!0,skipIncomingRangeSorting:!0};function x(n){return s(n.codePointAt(0),m,i)||s(n.codePointAt(0),I,i)}function A(n){return s(n.codePointAt(0),m,i)||s(n.codePointAt(0),y,i)}return h(P);})();
|
|
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
|
|
14
|
+
* @version 3.1.0
|
|
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
|
|
3
|
+
"version": "2.1.0",
|
|
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",
|
|
@@ -40,15 +40,18 @@
|
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
42
42
|
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
43
|
-
"
|
|
43
|
+
"devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
44
|
+
"dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
|
|
44
45
|
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
45
|
-
"lect": "node '../../ops/lect/lect.js'",
|
|
46
|
+
"lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
46
47
|
"letspublish": "yarn publish || :",
|
|
47
48
|
"lint": "eslint . --fix",
|
|
48
49
|
"perf": "node perf/check.js",
|
|
49
50
|
"prepare": "echo 'ready'",
|
|
51
|
+
"prettier": "prettier",
|
|
52
|
+
"prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
|
|
50
53
|
"pretest": "yarn run lect && yarn run build",
|
|
51
|
-
"test": "
|
|
54
|
+
"test": "yarn run devtest",
|
|
52
55
|
"unit": "uvu test"
|
|
53
56
|
},
|
|
54
57
|
"engines": {
|
|
@@ -69,6 +72,6 @@
|
|
|
69
72
|
}
|
|
70
73
|
},
|
|
71
74
|
"dependencies": {
|
|
72
|
-
"ranges-is-index-within": "^3.0
|
|
75
|
+
"ranges-is-index-within": "^3.1.0"
|
|
73
76
|
}
|
|
74
77
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare function isProduction4(char: string): boolean;
|
|
2
2
|
declare function isProduction4a(char: string): boolean;
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export {
|
|
5
|
+
isProduction4,
|
|
6
|
+
isProduction4a,
|
|
7
|
+
isProduction4 as validFirstChar,
|
|
8
|
+
isProduction4a as validSecondCharOnwards,
|
|
9
|
+
};
|