all-named-html-entities 2.0.4 → 2.0.10
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 +0 -20
- package/LICENSE +1 -1
- package/README.md +4 -1
- package/dist/all-named-html-entities.esm.js +3 -8125
- 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 +23 -82
- package/types/index.d.ts +1 -1
- 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.10",
|
|
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,96 +33,37 @@
|
|
|
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
|
-
"
|
|
48
|
-
"prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
|
|
49
|
-
"republish": "npm publish || :",
|
|
50
|
-
"tap": "tap",
|
|
51
|
-
"pretest": "npm run build",
|
|
52
|
-
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
|
|
53
|
-
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
54
|
-
"tsc": "tsc",
|
|
55
|
-
"unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
|
|
36
|
+
"build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
37
|
+
"dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
|
|
38
|
+
"dts": "rollup -c",
|
|
39
|
+
"examples": "node '../../ops/scripts/run-examples.js'",
|
|
40
|
+
"lect": "node '../../ops/lect/lect.js'",
|
|
41
|
+
"letspublish": "yarn publish || :",
|
|
42
|
+
"lint": "eslint . --fix",
|
|
43
|
+
"perf": "node perf/check.js",
|
|
44
|
+
"prepare": "echo 'ready'",
|
|
45
|
+
"pretest": "yarn run lect && yarn run build",
|
|
46
|
+
"test": "c8 yarn run unit && yarn run examples && yarn run lint",
|
|
47
|
+
"unit": "uvu test"
|
|
56
48
|
},
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"--no-warnings",
|
|
65
|
-
"--experimental-loader",
|
|
66
|
-
"@istanbuljs/esm-loader-hook"
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
51
|
+
},
|
|
52
|
+
"c8": {
|
|
53
|
+
"check-coverage": true,
|
|
54
|
+
"exclude": [
|
|
55
|
+
"**/test/**/*.*"
|
|
67
56
|
],
|
|
68
|
-
"
|
|
57
|
+
"lines": 100
|
|
69
58
|
},
|
|
70
59
|
"lect": {
|
|
71
60
|
"licence": {
|
|
72
61
|
"extras": [
|
|
73
62
|
""
|
|
74
63
|
]
|
|
75
|
-
},
|
|
76
|
-
"req": "{\n allNamedEntities,\n entStartsWith,\n entEndsWith,\n entStartsWithCaseInsensitive,\n entEndsWithCaseInsensitive,\n brokenNamedEntities,\n decode,\n minLength,\n maxLength,\n uncertain\n}",
|
|
77
|
-
"various": {
|
|
78
|
-
"devDependencies": [
|
|
79
|
-
"type-fest"
|
|
80
|
-
]
|
|
81
64
|
}
|
|
82
65
|
},
|
|
83
|
-
"dependencies": {
|
|
84
|
-
"@babel/runtime": "^7.16.0"
|
|
85
|
-
},
|
|
86
66
|
"devDependencies": {
|
|
87
|
-
"
|
|
88
|
-
"@babel/core": "^7.16.0",
|
|
89
|
-
"@babel/node": "^7.16.0",
|
|
90
|
-
"@babel/plugin-external-helpers": "^7.16.0",
|
|
91
|
-
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
92
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
93
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
94
|
-
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
95
|
-
"@babel/plugin-transform-runtime": "^7.16.0",
|
|
96
|
-
"@babel/preset-env": "^7.16.0",
|
|
97
|
-
"@babel/preset-typescript": "^7.16.0",
|
|
98
|
-
"@babel/register": "^7.16.0",
|
|
99
|
-
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
100
|
-
"@rollup/plugin-babel": "^5.3.0",
|
|
101
|
-
"@rollup/plugin-commonjs": "^21.0.1",
|
|
102
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
103
|
-
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
104
|
-
"@rollup/plugin-strip": "^2.1.0",
|
|
105
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
106
|
-
"@types/node": "^16.11.6",
|
|
107
|
-
"@types/tap": "^15.0.5",
|
|
108
|
-
"@typescript-eslint/eslint-plugin": "^5.3.0",
|
|
109
|
-
"@typescript-eslint/parser": "^5.3.0",
|
|
110
|
-
"core-js": "^3.19.1",
|
|
111
|
-
"cross-env": "^7.0.3",
|
|
112
|
-
"eslint": "^8.1.0",
|
|
113
|
-
"lect": "^0.18.4",
|
|
114
|
-
"rollup": "^2.59.0",
|
|
115
|
-
"rollup-plugin-ascii": "^0.0.3",
|
|
116
|
-
"rollup-plugin-banner": "^0.2.1",
|
|
117
|
-
"rollup-plugin-cleanup": "^3.2.1",
|
|
118
|
-
"rollup-plugin-dts": "^4.0.0",
|
|
119
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
120
|
-
"tap": "^15.0.10",
|
|
121
|
-
"tslib": "^2.3.1",
|
|
122
|
-
"type-fest": "^2.5.2",
|
|
123
|
-
"typescript": "^4.4.4"
|
|
124
|
-
},
|
|
125
|
-
"engines": {
|
|
126
|
-
"node": ">=12"
|
|
67
|
+
"type-fest": "^2.8.0"
|
|
127
68
|
}
|
|
128
69
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ declare type JsonValue = string | number | boolean | null | JsonObject | JsonArr
|
|
|
2
2
|
declare type JsonObject = {
|
|
3
3
|
[Key in string]?: JsonValue;
|
|
4
4
|
};
|
|
5
|
-
declare type JsonArray =
|
|
5
|
+
declare type JsonArray = JsonValue[];
|
|
6
6
|
declare const version: string;
|
|
7
7
|
declare const allNamedEntities: JsonObject;
|
|
8
8
|
declare const brokenNamedEntities: JsonObject;
|
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});"}}
|