string-trim-spaces-only 4.1.2 → 4.1.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
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
  ## 4.0.13 (2022-04-18)
13
13
 
14
- ### Bug Fixes
14
+ ### Fixed
15
15
 
16
16
  - tweak types ([e1e4166](https://github.com/codsen/codsen/commit/e1e4166157c90b0a8561b1d4c65defeffae84112))
17
17
 
@@ -39,7 +39,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
39
39
 
40
40
  ## 3.0.1 (2021-01-28)
41
41
 
42
- ### Bug Fixes
42
+ ### Fixed
43
43
 
44
44
  - add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
45
45
 
@@ -1,12 +1,12 @@
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.1.2
4
+ * @version 4.1.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 i="4.1.2";var g=i,u={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};function d(e,l){if(typeof e!="string")throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:
10
+ var i="4.1.3";var g=i,u={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};function d(e,l){if(typeof e!="string")throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:
11
11
  ${JSON.stringify(e,null,4)}`);let n={...u,...l};function o(t){return n.classicTrim&&!t.trim()||!n.classicTrim&&(n.space&&t===" "||n.cr&&t==="\r"||n.lf&&t===`
12
12
  `||n.tab&&t===" "||n.nbsp&&t==="\xA0")}let r,s;if(e.length){if(o(e[0]))for(let t=0,a=e.length;t<a;t++){if(!o(e[t])){r=t;break}if(t===e.length-1)return{res:"",ranges:[[0,e.length]]}}if(o(e[e.length-1])){for(let t=e.length;t--;)if(!o(e[t])){s=t+1;break}}return r?s?{res:e.slice(r,s),ranges:[[0,r],[s,e.length]]}:{res:e.slice(r),ranges:[[0,r]]}:s?{res:e.slice(0,s),ranges:[[s,e.length]]}:{res:e,ranges:[]}}return{res:"",ranges:[]}}export{u as defaults,d as trimSpaces,g as version};
@@ -1,12 +1,12 @@
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.1.2
4
+ * @version 4.1.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
- "use strict";var stringTrimSpacesOnly=(()=>{var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var u=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,a=(e,n)=>{for(var t in n||(n={}))p.call(n,t)&&u(e,t,n[t]);if(c)for(var t of c(n))f.call(n,t)&&u(e,t,n[t]);return e};var y=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},h=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $(n))!p.call(e,r)&&r!==t&&l(e,r,{get:()=>n[r],enumerable:!(o=b(n,r))||o.enumerable});return e};var E=e=>h(l({},"__esModule",{value:!0}),e);var S={};y(S,{defaults:()=>g,trimSpaces:()=>x,version:()=>D});var m="4.1.2";var D=m,g={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};function x(e,n){if(typeof e!="string")throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:
10
+ "use strict";var stringTrimSpacesOnly=(()=>{var l=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var u=(e,n,t)=>n in e?l(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,a=(e,n)=>{for(var t in n||(n={}))p.call(n,t)&&u(e,t,n[t]);if(c)for(var t of c(n))f.call(n,t)&&u(e,t,n[t]);return e};var y=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},h=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $(n))!p.call(e,r)&&r!==t&&l(e,r,{get:()=>n[r],enumerable:!(o=b(n,r))||o.enumerable});return e};var E=e=>h(l({},"__esModule",{value:!0}),e);var S={};y(S,{defaults:()=>g,trimSpaces:()=>x,version:()=>D});var m="4.1.3";var D=m,g={classicTrim:!1,cr:!1,lf:!1,tab:!1,space:!0,nbsp:!1};function x(e,n){if(typeof e!="string")throw new Error(`string-trim-spaces-only: [THROW_ID_01] input must be string! It was given as ${typeof e}, equal to:
11
11
  ${JSON.stringify(e,null,4)}`);let t=a(a({},g),n);function o(s){return t.classicTrim&&!s.trim()||!t.classicTrim&&(t.space&&s===" "||t.cr&&s==="\r"||t.lf&&s===`
12
12
  `||t.tab&&s===" "||t.nbsp&&s==="\xA0")}let r,i;if(e.length){if(o(e[0]))for(let s=0,d=e.length;s<d;s++){if(!o(e[s])){r=s;break}if(s===e.length-1)return{res:"",ranges:[[0,e.length]]}}if(o(e[e.length-1])){for(let s=e.length;s--;)if(!o(e[s])){i=s+1;break}}return r?i?{res:e.slice(r,i),ranges:[[0,r],[i,e.length]]}:{res:e.slice(r),ranges:[[0,r]]}:i?{res:e.slice(0,i),ranges:[[i,e.length]]}:{res:e,ranges:[]}}return{res:"",ranges:[]}}return E(S);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-trim-spaces-only",
3
- "version": "4.1.2",
3
+ "version": "4.1.3",
4
4
  "description": "Like String.trim() but you can choose granularly what to trim",
5
5
  "keywords": [
6
6
  "characters",