string-character-is-astral-surrogate 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,35 +1,35 @@
1
1
  /**
2
2
  * @name string-character-is-astral-surrogate
3
3
  * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
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/string-character-is-astral-surrogate/}
8
8
  */
9
9
 
10
10
  function isHighSurrogate(something) {
11
- if (typeof something === "string") {
12
- if (something.length === 0) {
13
- return false;
11
+ if (typeof something === "string") {
12
+ if (something.length === 0) {
13
+ return false;
14
+ }
15
+ return something.charCodeAt(0) >= 55296 && something.charCodeAt(0) <= 56319;
14
16
  }
15
- return something.charCodeAt(0) >= 55296 && something.charCodeAt(0) <= 56319;
16
- }
17
- if (something === undefined) {
18
- return false;
19
- }
20
- throw new TypeError(`string-character-is-astral-surrogate/isHighSurrogate(): the input is not string but ${typeof something}`);
17
+ if (something === undefined) {
18
+ return false;
19
+ }
20
+ throw new TypeError(`string-character-is-astral-surrogate/isHighSurrogate(): the input is not string but ${typeof something}`);
21
21
  }
22
22
  function isLowSurrogate(something) {
23
- if (typeof something === "string") {
24
- if (something.length === 0) {
25
- return false;
23
+ if (typeof something === "string") {
24
+ if (something.length === 0) {
25
+ return false;
26
+ }
27
+ return something.charCodeAt(0) >= 56320 && something.charCodeAt(0) <= 57343;
28
+ }
29
+ if (something === undefined) {
30
+ return false;
26
31
  }
27
- return something.charCodeAt(0) >= 56320 && something.charCodeAt(0) <= 57343;
28
- }
29
- if (something === undefined) {
30
- return false;
31
- }
32
- throw new TypeError(`string-character-is-astral-surrogate/isLowSurrogate(): the input is not string but ${typeof something}`);
32
+ throw new TypeError(`string-character-is-astral-surrogate/isLowSurrogate(): the input is not string but ${typeof something}`);
33
33
  }
34
34
 
35
35
  export { isHighSurrogate, isLowSurrogate };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name string-character-is-astral-surrogate
3
3
  * @fileoverview Tells, is given character a part of astral character, specifically, a high and low surrogate
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/string-character-is-astral-surrogate/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-character-is-astral-surrogate",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Tells, is given character a part of astral character, specifically, a high and low surrogate",
5
5
  "keywords": [
6
6
  "astral",
@@ -38,13 +38,12 @@
38
38
  "types": "types/index.d.ts",
39
39
  "scripts": {
40
40
  "build": "rollup -c",
41
- "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
42
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
41
+ "build:esbuild": "node '../../scripts/esbuild.js'",
42
+ "build:esbuild:dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
43
+ "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent",
43
44
  "clean_types": "../../scripts/cleanTypes.js",
44
45
  "dev": "rollup -c --dev",
45
46
  "devunittest": "npm run dev && tap --only -R 'base'",
46
- "esbuild": "node '../../scripts/esbuild.js'",
47
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
48
47
  "format": "npm run lect && npm run prettier && npm run lint",
49
48
  "lect": "lect",
50
49
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -53,17 +52,14 @@
53
52
  "republish": "npm publish || :",
54
53
  "tap": "tap",
55
54
  "pretest": "npm run build",
56
- "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
55
+ "test": "npm run test:ci && npm run perf",
56
+ "test:ci": "npm run unittest && npm run test:examples && npm run format",
57
57
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
58
58
  "tsc": "tsc",
59
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
59
+ "unittest": "tap --no-only --reporter=terse && tsc -p tsconfig.json --noEmit"
60
60
  },
61
61
  "tap": {
62
62
  "check-coverage": false,
63
- "coverage-report": [
64
- "json-summary",
65
- "text"
66
- ],
67
63
  "node-arg": [
68
64
  "--no-warnings",
69
65
  "--experimental-loader",
@@ -83,7 +79,7 @@
83
79
  }
84
80
  },
85
81
  "dependencies": {
86
- "@babel/runtime": "^7.16.0"
82
+ "@babel/runtime": "^7.16.3"
87
83
  },
88
84
  "devDependencies": {
89
85
  "@babel/cli": "^7.16.0",
@@ -94,8 +90,8 @@
94
90
  "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
95
91
  "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
96
92
  "@babel/plugin-proposal-optional-chaining": "^7.16.0",
97
- "@babel/plugin-transform-runtime": "^7.16.0",
98
- "@babel/preset-env": "^7.16.0",
93
+ "@babel/plugin-transform-runtime": "^7.16.4",
94
+ "@babel/preset-env": "^7.16.4",
99
95
  "@babel/preset-typescript": "^7.16.0",
100
96
  "@babel/register": "^7.16.0",
101
97
  "@istanbuljs/esm-loader-hook": "^0.1.2",
@@ -104,25 +100,25 @@
104
100
  "@rollup/plugin-node-resolve": "^13.0.6",
105
101
  "@rollup/plugin-strip": "^2.1.0",
106
102
  "@rollup/plugin-typescript": "^8.3.0",
107
- "@types/node": "^16.11.6",
103
+ "@types/node": "^16.11.9",
108
104
  "@types/tap": "^15.0.5",
109
- "@typescript-eslint/eslint-plugin": "^5.3.0",
110
- "@typescript-eslint/parser": "^5.3.0",
105
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
106
+ "@typescript-eslint/parser": "^5.4.0",
111
107
  "core-js": "^3.19.1",
112
108
  "cross-env": "^7.0.3",
113
- "eslint": "^8.2.0",
114
- "lect": "^0.18.5",
115
- "rollup": "^2.59.0",
109
+ "eslint": "^8.3.0",
110
+ "lect": "^0.18.6",
111
+ "rollup": "^2.60.0",
116
112
  "rollup-plugin-ascii": "^0.0.3",
117
113
  "rollup-plugin-banner": "^0.2.1",
118
114
  "rollup-plugin-cleanup": "^3.2.1",
119
115
  "rollup-plugin-dts": "^4.0.1",
120
116
  "rollup-plugin-terser": "^7.0.2",
121
- "tap": "^15.0.10",
117
+ "tap": "^15.1.2",
122
118
  "tslib": "^2.3.1",
123
- "typescript": "^4.4.4"
119
+ "typescript": "^4.5.2"
124
120
  },
125
121
  "engines": {
126
- "node": ">=12"
122
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
127
123
  }
128
124
  }