string-trim-spaces-only 4.0.2 → 4.0.3
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,6 +3,20 @@
|
|
|
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
|
+
## 4.0.3 (2021-11-02)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- bump TS and separate ESLint plugins away from this monorepo ([b1ebce1](https://github.com/codsen/codsen/commit/b1ebce1637d8c41c2d848fc24b0ba4058865bd5d))
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- migrate to ES Modules ([c579dff](https://github.com/codsen/codsen/commit/c579dff3b23205e383035ca10ddcec671e35d0fe))
|
|
15
|
+
|
|
16
|
+
### BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
- programs now are in ES Modules and won't work with Common JS require()
|
|
19
|
+
|
|
6
20
|
## 4.0.1 (2021-09-13)
|
|
7
21
|
|
|
8
22
|
### Bug Fixes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-trim-spaces-only
|
|
3
3
|
* @fileoverview Like String.trim() but you can choose granularly what to trim
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-trim-spaces-only/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var version$1 = "4.0.
|
|
10
|
+
var version$1 = "4.0.3";
|
|
11
11
|
|
|
12
12
|
const version = version$1;
|
|
13
13
|
const defaults = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-trim-spaces-only
|
|
3
3
|
* @fileoverview Like String.trim() but you can choose granularly what to trim
|
|
4
|
-
* @version 4.0.
|
|
4
|
+
* @version 4.0.3
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-trim-spaces-only/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).stringTrimSpacesOnly={})}(this,(function(e){"use strict";const n={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};e.defaults=n,e.trimSpaces=function(e,t){if("string"!=typeof e)throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:\n${JSON.stringify(e,null,4)}`);const s={...n,...t};function r(e){return s.classicTrim&&!e.trim()||!s.classicTrim&&(s.space&&" "===e||s.cr&&"\r"===e||s.lf&&"\n"===e||s.tab&&"\t"===e||s.nbsp&&" "===e)}let i,l;if(e.length){if(r(e[0]))for(let n=0,t=e.length;n<t;n++){if(!r(e[n])){i=n;break}if(n===e.length-1)return{res:"",ranges:[[0,e.length]]}}if(r(e[e.length-1]))for(let n=e.length;n--;)if(!r(e[n])){l=n+1;break}return i?l?{res:e.slice(i,l),ranges:[[0,i],[l,e.length]]}:{res:e.slice(i),ranges:[[0,i]]}:l?{res:e.slice(0,l),ranges:[[l,e.length]]}:{res:e,ranges:[]}}return{res:"",ranges:[]}},e.version="4.0.
|
|
10
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).stringTrimSpacesOnly={})}(this,(function(e){"use strict";const n={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};e.defaults=n,e.trimSpaces=function(e,t){if("string"!=typeof e)throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:\n${JSON.stringify(e,null,4)}`);const s={...n,...t};function r(e){return s.classicTrim&&!e.trim()||!s.classicTrim&&(s.space&&" "===e||s.cr&&"\r"===e||s.lf&&"\n"===e||s.tab&&"\t"===e||s.nbsp&&" "===e)}let i,l;if(e.length){if(r(e[0]))for(let n=0,t=e.length;n<t;n++){if(!r(e[n])){i=n;break}if(n===e.length-1)return{res:"",ranges:[[0,e.length]]}}if(r(e[e.length-1]))for(let n=e.length;n--;)if(!r(e[n])){l=n+1;break}return i?l?{res:e.slice(i,l),ranges:[[0,i],[l,e.length]]}:{res:e.slice(i),ranges:[[0,i]]}:l?{res:e.slice(0,l),ranges:[[l,e.length]]}:{res:e,ranges:[]}}return{res:"",ranges:[]}},e.version="4.0.3",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "string-trim-spaces-only",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Like String.trim() but you can choose granularly what to trim",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"characters",
|
|
@@ -34,11 +34,13 @@
|
|
|
34
34
|
"types": "types/index.d.ts",
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "rollup -c",
|
|
37
|
-
"esbuild": "node '../../scripts/esbuild.js'",
|
|
38
|
-
"esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
|
|
39
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
40
|
"dev": "rollup -c --dev",
|
|
41
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'",
|
|
42
44
|
"format": "npm run lect && npm run prettier && npm run lint",
|
|
43
45
|
"lect": "lect",
|
|
44
46
|
"lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
|
|
@@ -46,13 +48,11 @@
|
|
|
46
48
|
"prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
|
|
47
49
|
"republish": "npm publish || :",
|
|
48
50
|
"tap": "tap",
|
|
49
|
-
"tsc": "tsc",
|
|
50
51
|
"pretest": "npm run build",
|
|
51
52
|
"test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
|
|
52
53
|
"test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"clean_types": "../../scripts/cleanTypes.js"
|
|
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"
|
|
56
56
|
},
|
|
57
57
|
"tap": {
|
|
58
58
|
"check-coverage": false,
|
|
@@ -79,45 +79,45 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@babel/runtime": "^7.
|
|
82
|
+
"@babel/runtime": "^7.16.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
|
-
"@babel/cli": "^7.
|
|
86
|
-
"@babel/core": "^7.
|
|
87
|
-
"@babel/node": "^7.
|
|
88
|
-
"@babel/plugin-external-helpers": "^7.
|
|
89
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
90
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
91
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
92
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
93
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
94
|
-
"@babel/preset-env": "^7.
|
|
95
|
-
"@babel/preset-typescript": "^7.
|
|
96
|
-
"@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.0",
|
|
94
|
+
"@babel/preset-env": "^7.16.0",
|
|
95
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
96
|
+
"@babel/register": "^7.16.0",
|
|
97
97
|
"@istanbuljs/esm-loader-hook": "^0.1.2",
|
|
98
98
|
"@rollup/plugin-babel": "^5.3.0",
|
|
99
|
-
"@rollup/plugin-commonjs": "^
|
|
99
|
+
"@rollup/plugin-commonjs": "^21.0.1",
|
|
100
100
|
"@rollup/plugin-json": "^4.1.0",
|
|
101
|
-
"@rollup/plugin-node-resolve": "^13.0.
|
|
101
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
102
102
|
"@rollup/plugin-strip": "^2.1.0",
|
|
103
|
-
"@rollup/plugin-typescript": "^8.
|
|
104
|
-
"@types/node": "^16.
|
|
103
|
+
"@rollup/plugin-typescript": "^8.3.0",
|
|
104
|
+
"@types/node": "^16.11.6",
|
|
105
105
|
"@types/tap": "^15.0.5",
|
|
106
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
107
|
-
"@typescript-eslint/parser": "^
|
|
108
|
-
"core-js": "^3.
|
|
106
|
+
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
|
107
|
+
"@typescript-eslint/parser": "^5.2.0",
|
|
108
|
+
"core-js": "^3.19.0",
|
|
109
109
|
"cross-env": "^7.0.3",
|
|
110
|
-
"eslint": "^
|
|
111
|
-
"lect": "^0.18.
|
|
112
|
-
"rollup": "^2.
|
|
110
|
+
"eslint": "^8.1.0",
|
|
111
|
+
"lect": "^0.18.3",
|
|
112
|
+
"rollup": "^2.59.0",
|
|
113
113
|
"rollup-plugin-ascii": "^0.0.3",
|
|
114
114
|
"rollup-plugin-banner": "^0.2.1",
|
|
115
115
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
116
116
|
"rollup-plugin-dts": "^4.0.0",
|
|
117
117
|
"rollup-plugin-terser": "^7.0.2",
|
|
118
|
-
"tap": "^15.0.
|
|
118
|
+
"tap": "^15.0.10",
|
|
119
119
|
"tslib": "^2.3.1",
|
|
120
|
-
"typescript": "^4.4.
|
|
120
|
+
"typescript": "^4.4.4"
|
|
121
121
|
},
|
|
122
122
|
"engines": {
|
|
123
123
|
"node": ">=12"
|