all-named-html-entities 2.0.6 → 2.0.12
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/LICENSE +1 -1
- package/README.md +4 -5
- package/dist/all-named-html-entities.esm.js +3 -21238
- package/dist/all-named-html-entities.umd.js +3 -2
- package/examples/_quickTake.js +2 -0
- package/examples/allNamedEntities.js +1 -0
- package/examples/entEndsWith.js +1 -0
- package/examples/entStartsWith.js +1 -0
- package/examples/entStartsWithCaseInsensitive.js +1 -0
- package/package.json +26 -78
- package/types/index.d.ts +24 -4
- package/examples/api.json +0 -1
package/examples/_quickTake.js
CHANGED
package/examples/entEndsWith.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "all-named-html-entities",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.12",
|
|
4
4
|
"description": "List of all named HTML entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"all",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "https://github.com/codsen/codsen.git",
|
|
21
|
-
"directory": "packages/all-named-html-entities"
|
|
21
|
+
"directory": "packages-external/all-named-html-entities"
|
|
22
22
|
},
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"author": {
|
|
@@ -33,92 +33,40 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "types/index.d.ts",
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"prettier": "
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"test": "npm run test:ci && npm run perf",
|
|
52
|
-
"test:ci": "npm run unittest && npm run test:examples && npm run format",
|
|
53
|
-
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
54
|
-
"tsc": "tsc",
|
|
55
|
-
"unittest": "tap --no-only --reporter=terse && tsc -p tsconfig.json --noEmit"
|
|
36
|
+
"build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
37
|
+
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
38
|
+
"devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
39
|
+
"dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
|
|
40
|
+
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
41
|
+
"lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
|
|
42
|
+
"letspublish": "yarn publish || :",
|
|
43
|
+
"lint": "eslint . --fix",
|
|
44
|
+
"perf": "node perf/check.js",
|
|
45
|
+
"prepare": "echo 'ready'",
|
|
46
|
+
"prettier": "prettier",
|
|
47
|
+
"prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
|
|
48
|
+
"pretest": "yarn run lect && yarn run build",
|
|
49
|
+
"test": "yarn run devtest",
|
|
50
|
+
"unit": "uvu test"
|
|
56
51
|
},
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
54
|
+
},
|
|
55
|
+
"c8": {
|
|
56
|
+
"check-coverage": true,
|
|
57
|
+
"exclude": [
|
|
58
|
+
"**/test/**/*.*"
|
|
63
59
|
],
|
|
64
|
-
"
|
|
60
|
+
"lines": 100
|
|
65
61
|
},
|
|
66
62
|
"lect": {
|
|
67
63
|
"licence": {
|
|
68
64
|
"extras": [
|
|
69
65
|
""
|
|
70
66
|
]
|
|
71
|
-
},
|
|
72
|
-
"req": "{\n allNamedEntities,\n entStartsWith,\n entEndsWith,\n entStartsWithCaseInsensitive,\n entEndsWithCaseInsensitive,\n brokenNamedEntities,\n decode,\n minLength,\n maxLength,\n uncertain\n}",
|
|
73
|
-
"various": {
|
|
74
|
-
"devDependencies": [
|
|
75
|
-
"type-fest"
|
|
76
|
-
]
|
|
77
67
|
}
|
|
78
68
|
},
|
|
79
|
-
"dependencies": {
|
|
80
|
-
"@babel/runtime": "^7.16.3"
|
|
81
|
-
},
|
|
82
69
|
"devDependencies": {
|
|
83
|
-
"
|
|
84
|
-
"@babel/core": "^7.16.0",
|
|
85
|
-
"@babel/node": "^7.16.0",
|
|
86
|
-
"@babel/plugin-external-helpers": "^7.16.0",
|
|
87
|
-
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
88
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
89
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
90
|
-
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
91
|
-
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
92
|
-
"@babel/preset-env": "^7.16.4",
|
|
93
|
-
"@babel/preset-typescript": "^7.16.0",
|
|
94
|
-
"@babel/register": "^7.16.0",
|
|
95
|
-
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
96
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
97
|
-
"@rollup/plugin-commonjs": "^21.0.1",
|
|
98
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
99
|
-
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
100
|
-
"@rollup/plugin-strip": "^2.1.0",
|
|
101
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
102
|
-
"@types/node": "^16.11.9",
|
|
103
|
-
"@types/tap": "^15.0.5",
|
|
104
|
-
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
105
|
-
"@typescript-eslint/parser": "^5.4.0",
|
|
106
|
-
"core-js": "^3.19.1",
|
|
107
|
-
"cross-env": "^7.0.3",
|
|
108
|
-
"eslint": "^8.3.0",
|
|
109
|
-
"lect": "^0.18.6",
|
|
110
|
-
"rollup": "^2.60.0",
|
|
111
|
-
"rollup-plugin-ascii": "^0.0.3",
|
|
112
|
-
"rollup-plugin-banner": "^0.2.1",
|
|
113
|
-
"rollup-plugin-cleanup": "^3.2.1",
|
|
114
|
-
"rollup-plugin-dts": "^4.0.1",
|
|
115
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
116
|
-
"tap": "^15.1.2",
|
|
117
|
-
"tslib": "^2.3.1",
|
|
118
|
-
"type-fest": "^2.5.4",
|
|
119
|
-
"typescript": "^4.5.2"
|
|
120
|
-
},
|
|
121
|
-
"engines": {
|
|
122
|
-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
70
|
+
"type-fest": "^2.10.0"
|
|
123
71
|
}
|
|
124
72
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
declare type JsonValue =
|
|
1
|
+
declare type JsonValue =
|
|
2
|
+
| string
|
|
3
|
+
| number
|
|
4
|
+
| boolean
|
|
5
|
+
| null
|
|
6
|
+
| JsonObject
|
|
7
|
+
| JsonArray;
|
|
2
8
|
declare type JsonObject = {
|
|
3
|
-
|
|
9
|
+
[Key in string]?: JsonValue;
|
|
4
10
|
};
|
|
5
|
-
declare type JsonArray =
|
|
11
|
+
declare type JsonArray = JsonValue[];
|
|
6
12
|
declare const version: string;
|
|
7
13
|
declare const allNamedEntities: JsonObject;
|
|
8
14
|
declare const brokenNamedEntities: JsonObject;
|
|
@@ -17,4 +23,18 @@ declare function decode(ent: string): string | null;
|
|
|
17
23
|
declare const minLength = 2;
|
|
18
24
|
declare const maxLength = 31;
|
|
19
25
|
|
|
20
|
-
export {
|
|
26
|
+
export {
|
|
27
|
+
allNamedEntities,
|
|
28
|
+
allNamedEntitiesSetOnly,
|
|
29
|
+
allNamedEntitiesSetOnlyCaseInsensitive,
|
|
30
|
+
brokenNamedEntities,
|
|
31
|
+
decode,
|
|
32
|
+
entEndsWith,
|
|
33
|
+
entEndsWithCaseInsensitive,
|
|
34
|
+
entStartsWith,
|
|
35
|
+
entStartsWithCaseInsensitive,
|
|
36
|
+
maxLength,
|
|
37
|
+
minLength,
|
|
38
|
+
uncertain,
|
|
39
|
+
version,
|
|
40
|
+
};
|
package/examples/api.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport {\n allNamedEntities,\n allNamedEntitiesSetOnly,\n allNamedEntitiesSetOnlyCaseInsensitive,\n entStartsWith,\n entEndsWith,\n entStartsWithCaseInsensitive,\n entEndsWithCaseInsensitive,\n brokenNamedEntities,\n decode,\n minLength,\n maxLength,\n uncertain,\n} from \"all-named-html-entities\";\n\nassert.equal(Object.keys(allNamedEntities).length, 2125);\nassert.equal(entStartsWith.A.E[0], \"AElig\");"},"allNamedEntities.js":{"title":"`allNamedEntities`","content":"import { strict as assert } from \"assert\";\nimport { allNamedEntities } from \"all-named-html-entities\";\n\n// total named entities count:\nassert.equal(Object.keys(allNamedEntities).length, 2125);\n\n// show the first-one:\nassert.equal(Object.keys(allNamedEntities).sort()[0], \"AElig\");\n\n// Æ decoded:\nassert.equal(allNamedEntities.AElig, \"Æ\");"},"entEndsWith.js":{"title":"`entEndsWith`","content":"import { strict as assert } from \"assert\";\nimport { entEndsWith } from \"all-named-html-entities\";\n\n// here's list of named HTML entities which end with character \"2\":\nassert.deepEqual(entEndsWith[\"2\"], {\n 1: [\"blk12\", \"frac12\"],\n p: [\"sup2\"],\n});\n\n// query directly\nassert.equal(entEndsWith[\"2\"].p[0], \"sup2\");"},"entStartsWith.js":{"title":"`entStartsWith`","content":"import { strict as assert } from \"assert\";\nimport { entStartsWith } from \"all-named-html-entities\";\n\n// for perf reasons, they're pre-grouped by first two letters\nassert.deepEqual(entStartsWith.A, {\n a: [\"Aacute\"],\n b: [\"Abreve\"],\n c: [\"Acirc\", \"Acy\"],\n E: [\"AElig\"],\n f: [\"Afr\"],\n g: [\"Agrave\"],\n l: [\"Alpha\"],\n m: [\"Amacr\"],\n M: [\"AMP\"],\n n: [\"And\"],\n o: [\"Aogon\", \"Aopf\"],\n p: [\"ApplyFunction\"],\n r: [\"Aring\"],\n s: [\"Ascr\", \"Assign\"],\n t: [\"Atilde\"],\n u: [\"Auml\"],\n});\n\n// query directly\nassert.equal(entStartsWith.A.E[0], \"AElig\");"},"entStartsWithCaseInsensitive.js":{"title":"`entStartsWithCaseInsensitive`","content":"import { strict as assert } from \"assert\";\nimport { entStartsWithCaseInsensitive } from \"all-named-html-entities\";\n\n// case-insensitive \"entStartsWithCaseInsensitive\" is useful\n// when looking for possibly mis-typed entities; emlint uses it\n\n// which entities, lowercased, start with \"j\"?\nassert.deepEqual(entStartsWithCaseInsensitive.j, {\n c: [\"jcirc\", \"jcy\"],\n f: [\"jfr\"],\n m: [\"jmath\"],\n o: [\"jopf\"],\n s: [\"jscr\", \"jsercy\"],\n u: [\"jukcy\"],\n});"}}
|