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.
@@ -1,6 +1,8 @@
1
+ /* eslint-disable no-unused-vars */
1
2
  // Quick Take
2
3
 
3
4
  import { strict as assert } from "assert";
5
+
4
6
  import {
5
7
  allNamedEntities,
6
8
  allNamedEntitiesSetOnly,
@@ -1,6 +1,7 @@
1
1
  // `allNamedEntities`
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { allNamedEntities } from "../dist/all-named-html-entities.esm.js";
5
6
 
6
7
  // total named entities count:
@@ -1,6 +1,7 @@
1
1
  // `entEndsWith`
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { entEndsWith } from "../dist/all-named-html-entities.esm.js";
5
6
 
6
7
  // here's list of named HTML entities which end with character "2":
@@ -1,6 +1,7 @@
1
1
  // `entStartsWith`
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { entStartsWith } from "../dist/all-named-html-entities.esm.js";
5
6
 
6
7
  // for perf reasons, they're pre-grouped by first two letters
@@ -1,6 +1,7 @@
1
1
  // `entStartsWithCaseInsensitive`
2
2
 
3
3
  import { strict as assert } from "assert";
4
+
4
5
  import { entStartsWithCaseInsensitive } from "../dist/all-named-html-entities.esm.js";
5
6
 
6
7
  // case-insensitive "entStartsWithCaseInsensitive" is useful
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "all-named-html-entities",
3
- "version": "2.0.4",
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": "rollup -c",
37
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
38
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
39
- "clean_types": "../../scripts/cleanTypes.js",
40
- "dev": "rollup -c --dev",
41
- "devunittest": "npm run dev && tap --only -R 'base'",
42
- "esbuild": "node '../../scripts/esbuild.js'",
43
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
44
- "format": "npm run lect && npm run prettier && npm run lint",
45
- "lect": "lect",
46
- "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
47
- "perf": "node perf/check",
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
- "tap": {
58
- "check-coverage": false,
59
- "coverage-report": [
60
- "json-summary",
61
- "text"
62
- ],
63
- "node-arg": [
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
- "timeout": 0
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
- "@babel/cli": "^7.16.0",
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 = Array<JsonValue>;
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 &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B;\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&#x7D; 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 &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; allNamedEntities &#x7D; 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// &AElig; decoded:\nassert.equal(allNamedEntities.AElig, \"Æ\");"},"entEndsWith.js":{"title":"`entEndsWith`","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; entEndsWith &#x7D; from \"all-named-html-entities\";\n\n// here's list of named HTML entities which end with character \"2\":\nassert.deepEqual(entEndsWith[\"2\"], &#x7B;\n 1: [\"blk12\", \"frac12\"],\n p: [\"sup2\"],\n&#x7D;);\n\n// query directly\nassert.equal(entEndsWith[\"2\"].p[0], \"sup2\");"},"entStartsWith.js":{"title":"`entStartsWith`","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; entStartsWith &#x7D; from \"all-named-html-entities\";\n\n// for perf reasons, they're pre-grouped by first two letters\nassert.deepEqual(entStartsWith.A, &#x7B;\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&#x7D;);\n\n// query directly\nassert.equal(entStartsWith.A.E[0], \"AElig\");"},"entStartsWithCaseInsensitive.js":{"title":"`entStartsWithCaseInsensitive`","content":"import &#x7B; strict as assert &#x7D; from \"assert\";\nimport &#x7B; entStartsWithCaseInsensitive &#x7D; 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, &#x7B;\n c: [\"jcirc\", \"jcy\"],\n f: [\"jfr\"],\n m: [\"jmath\"],\n o: [\"jopf\"],\n s: [\"jscr\", \"jsercy\"],\n u: [\"jukcy\"],\n&#x7D;);"}}