string-trim-spaces-only 4.0.6 → 4.0.7

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,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.6
4
+ * @version 4.0.7
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.6";
10
+ var version$1 = "4.0.7";
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.6
4
+ * @version 4.0.7
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.6",Object.defineProperty(e,"__esModule",{value:!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.7",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.6",
3
+ "version": "4.0.7",
4
4
  "description": "Like String.trim() but you can choose granularly what to trim",
5
5
  "keywords": [
6
6
  "characters",
@@ -97,21 +97,21 @@
97
97
  "@rollup/plugin-node-resolve": "^13.0.6",
98
98
  "@rollup/plugin-strip": "^2.1.0",
99
99
  "@rollup/plugin-typescript": "^8.3.0",
100
- "@types/node": "^16.11.9",
100
+ "@types/node": "^16.11.10",
101
101
  "@types/tap": "^15.0.5",
102
- "@typescript-eslint/eslint-plugin": "^5.4.0",
103
- "@typescript-eslint/parser": "^5.4.0",
104
- "core-js": "^3.19.1",
102
+ "@typescript-eslint/eslint-plugin": "^5.5.0",
103
+ "@typescript-eslint/parser": "^5.5.0",
104
+ "core-js": "^3.19.2",
105
105
  "cross-env": "^7.0.3",
106
106
  "eslint": "^8.3.0",
107
- "lect": "^0.18.6",
108
- "rollup": "^2.60.0",
107
+ "lect": "^0.18.7",
108
+ "rollup": "^2.60.1",
109
109
  "rollup-plugin-ascii": "^0.0.3",
110
110
  "rollup-plugin-banner": "^0.2.1",
111
111
  "rollup-plugin-cleanup": "^3.2.1",
112
112
  "rollup-plugin-dts": "^4.0.1",
113
113
  "rollup-plugin-terser": "^7.0.2",
114
- "tap": "^15.1.2",
114
+ "tap": "^15.1.5",
115
115
  "tslib": "^2.3.1",
116
116
  "typescript": "^4.5.2"
117
117
  },