string-character-is-astral-surrogate 2.0.2 → 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.
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
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.0.1 (2021-09-13)
|
|
7
|
-
|
|
8
|
-
### Bug Fixes
|
|
9
|
-
|
|
10
|
-
- bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
|
|
11
|
-
|
|
12
6
|
## 2.0.0 (2021-09-09)
|
|
13
7
|
|
|
14
8
|
### Features
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010
|
|
3
|
+
Copyright (c) 2010-2021 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
|
|
@@ -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.
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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,9 +38,10 @@
|
|
|
38
38
|
"types": "types/index.d.ts",
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "rollup -c",
|
|
41
|
-
"esbuild": "node '../../scripts/esbuild.js'",
|
|
42
|
-
"
|
|
43
|
-
"ci_test": "npm run build && npm run format && tap --no-only --reporter=silent
|
|
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",
|
|
44
|
+
"clean_types": "../../scripts/cleanTypes.js",
|
|
44
45
|
"dev": "rollup -c --dev",
|
|
45
46
|
"devunittest": "npm run dev && tap --only -R 'base'",
|
|
46
47
|
"format": "npm run lect && npm run prettier && npm run lint",
|
|
@@ -50,20 +51,15 @@
|
|
|
50
51
|
"prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
|
|
51
52
|
"republish": "npm publish || :",
|
|
52
53
|
"tap": "tap",
|
|
53
|
-
"tsc": "tsc",
|
|
54
54
|
"pretest": "npm run build",
|
|
55
|
-
"test": "npm run
|
|
55
|
+
"test": "npm run test:ci && npm run perf",
|
|
56
|
+
"test:ci": "npm run unittest && npm run test:examples && npm run format",
|
|
56
57
|
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"clean_types": "../../scripts/cleanTypes.js"
|
|
58
|
+
"tsc": "tsc",
|
|
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,46 +79,46 @@
|
|
|
83
79
|
}
|
|
84
80
|
},
|
|
85
81
|
"dependencies": {
|
|
86
|
-
"@babel/runtime": "^7.
|
|
82
|
+
"@babel/runtime": "^7.16.3"
|
|
87
83
|
},
|
|
88
84
|
"devDependencies": {
|
|
89
|
-
"@babel/cli": "^7.
|
|
90
|
-
"@babel/core": "^7.
|
|
91
|
-
"@babel/node": "^7.
|
|
92
|
-
"@babel/plugin-external-helpers": "^7.
|
|
93
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
94
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
95
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
96
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
97
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
98
|
-
"@babel/preset-env": "^7.
|
|
99
|
-
"@babel/preset-typescript": "^7.
|
|
100
|
-
"@babel/register": "^7.
|
|
85
|
+
"@babel/cli": "^7.16.0",
|
|
86
|
+
"@babel/core": "^7.16.0",
|
|
87
|
+
"@babel/node": "^7.16.0",
|
|
88
|
+
"@babel/plugin-external-helpers": "^7.16.0",
|
|
89
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
90
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
91
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
|
|
92
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
93
|
+
"@babel/plugin-transform-runtime": "^7.16.4",
|
|
94
|
+
"@babel/preset-env": "^7.16.4",
|
|
95
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
96
|
+
"@babel/register": "^7.16.0",
|
|
101
97
|
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
102
98
|
"@rollup/plugin-babel": "^5.3.0",
|
|
103
|
-
"@rollup/plugin-commonjs": "^
|
|
104
|
-
"@rollup/plugin-node-resolve": "^13.0.
|
|
99
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
100
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
105
101
|
"@rollup/plugin-strip": "^2.1.0",
|
|
106
|
-
"@rollup/plugin-typescript": "^8.
|
|
107
|
-
"@types/node": "^16.9
|
|
102
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
103
|
+
"@types/node": "^16.11.9",
|
|
108
104
|
"@types/tap": "^15.0.5",
|
|
109
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
110
|
-
"@typescript-eslint/parser": "^4.
|
|
111
|
-
"core-js": "^3.
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
106
|
+
"@typescript-eslint/parser": "^5.4.0",
|
|
107
|
+
"core-js": "^3.19.1",
|
|
112
108
|
"cross-env": "^7.0.3",
|
|
113
|
-
"eslint": "^
|
|
114
|
-
"lect": "^0.18.
|
|
115
|
-
"rollup": "^2.
|
|
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
|
-
"rollup-plugin-dts": "^4.0.
|
|
115
|
+
"rollup-plugin-dts": "^4.0.1",
|
|
120
116
|
"rollup-plugin-terser": "^7.0.2",
|
|
121
|
-
"tap": "^15.
|
|
117
|
+
"tap": "^15.1.2",
|
|
122
118
|
"tslib": "^2.3.1",
|
|
123
|
-
"typescript": "^4.
|
|
119
|
+
"typescript": "^4.5.2"
|
|
124
120
|
},
|
|
125
121
|
"engines": {
|
|
126
|
-
"node": ">=
|
|
122
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
127
123
|
}
|
|
128
124
|
}
|