string-split-by-whitespace 3.2.2 → 3.2.4
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
|
@@ -12,7 +12,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
12
12
|
|
|
13
13
|
## 3.1.3 (2022-04-18)
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Fixed
|
|
16
16
|
|
|
17
17
|
- tweak types ([b44dc8d](https://github.com/codsen/codsen/commit/b44dc8d12b30bfb15936ca63687d6f834c5e1f2a))
|
|
18
18
|
|
|
@@ -46,7 +46,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
46
46
|
|
|
47
47
|
## 2.0.1 (2021-01-28)
|
|
48
48
|
|
|
49
|
-
###
|
|
49
|
+
### Fixed
|
|
50
50
|
|
|
51
51
|
- add testStats to npmignore ([f3c84e9](https://github.com/codsen/codsen/commit/f3c84e95afc5514214312f913692d85b2e12eb29))
|
|
52
52
|
|
|
@@ -72,27 +72,27 @@ Accidental version bump during migration to sourcehut. Sorry about that.
|
|
|
72
72
|
|
|
73
73
|
## 1.6.0 (2019-01-20)
|
|
74
74
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
75
|
+
- Various documentation and setup tweaks after we migrated to monorepo
|
|
76
|
+
- Setup refresh: updated dependencies and all config files using automated tools
|
|
77
77
|
|
|
78
78
|
## 1.3.0 (2018-06-16)
|
|
79
79
|
|
|
80
80
|
GitHub sold us out. In the meantime, we:
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
82
|
+
- Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
|
|
83
|
+
- Dropped BitHound (RIP) and Travis
|
|
84
84
|
|
|
85
85
|
## 1.2.0 (2018-05-26)
|
|
86
86
|
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
87
|
+
- Set up [Prettier](https://prettier.io) on a custom ESLint rule set.
|
|
88
|
+
- Removed `package.lock` and `.editorconfig`
|
|
89
|
+
- Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — there's no need to comment-out `console.log` statements or care about them not spilling into production. Now it's done automatically.
|
|
90
|
+
- Unit tests are pointing at ES modules build, which means that code coverage is correct now, without Babel functions being missed. This is important because now code coverage is real again and now there are no excuses not to perfect it.
|
|
91
91
|
|
|
92
92
|
## 1.1.0 (2018-01-12)
|
|
93
93
|
|
|
94
|
-
-
|
|
94
|
+
- Add `opts.ignoreRanges`
|
|
95
95
|
|
|
96
96
|
## 1.0.0 (2018-01-11)
|
|
97
97
|
|
|
98
|
-
-
|
|
98
|
+
- First public release
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-split-by-whitespace
|
|
3
3
|
* @fileoverview Split string into array by chunks of whitespace
|
|
4
|
-
* @version 3.2.
|
|
4
|
+
* @version 3.2.4
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-split-by-whitespace/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{isIndexWithin as a}from"ranges-is-index-within";var o="3.2.
|
|
10
|
+
import{isIndexWithin as a}from"ranges-is-index-within";var o="3.2.4";var f=o,u={ignoreRanges:[]};function R(t,p){if(t===void 0)throw new Error("string-split-by-whitespace: [THROW_ID_01] The input is missing!");if(typeof t!="string")return t;if(t.trim()==="")return[];let n={...u,...p};if(n.ignoreRanges.length&&!n.ignoreRanges.every(e=>Array.isArray(e)))throw new Error("string-split-by-whitespace: [THROW_ID_03] The resolvedOpts.ignoreRanges contains elements which are not arrays!");let s=null,r=[];for(let e=0,l=t.length;e<l;e++)s===null&&t[e].trim()&&(!n||!n.ignoreRanges||!n.ignoreRanges.length||n.ignoreRanges.length&&!a(e,n.ignoreRanges.map(i=>[i[0],i[1]-1]),{inclusiveRangeEnds:!0}))&&(s=e),s!==null&&(t[e].trim()?n.ignoreRanges.length&&a(e,n.ignoreRanges)?(r.push(t.slice(s,e-1)),s=null):t[e+1]===void 0&&r.push(t.slice(s,e+1)):(r.push(t.slice(s,e)),s=null));return r}export{u as defaults,R as splitByW,f as version};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name string-split-by-whitespace
|
|
3
3
|
* @fileoverview Split string into array by chunks of whitespace
|
|
4
|
-
* @version 3.2.
|
|
4
|
+
* @version 3.2.4
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/string-split-by-whitespace/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var stringSplitByWhitespace=(()=>{var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,a=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&d(e,n,t[n]);if(u)for(var n of u(t))R.call(t,n)&&d(e,n,t[n]);return e};var b=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!c.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(s=m(t,r))||s.enumerable});return e};var w=e=>v(o({},"__esModule",{value:!0}),e);var T={};b(T,{defaults:()=>h,splitByW:()=>E,version:()=>O});var x={inclusiveRangeEnds:!1,returnMatchedRangeInsteadOfTrue:!1};function l(e,t,n){let s=a(a({},x),n);if(!Number.isInteger(e))throw new Error(`ranges-is-index-within: [THROW_ID_01] the first input argument should be string index, a natural number (or zero). It was given as ${e} (type ${typeof e})`);return Array.isArray(t)?s.returnMatchedRangeInsteadOfTrue?t.find(r=>s.inclusiveRangeEnds?e>=r[0]&&e<=r[1]:e>r[0]&&e<r[1])||!1:t.some(r=>s.inclusiveRangeEnds?e>=r[0]&&e<=r[1]:e>r[0]&&e<r[1]):!1}var g="3.2.
|
|
10
|
+
"use strict";var stringSplitByWhitespace=(()=>{var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,a=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&d(e,n,t[n]);if(u)for(var n of u(t))R.call(t,n)&&d(e,n,t[n]);return e};var b=(e,t)=>{for(var n in t)o(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!c.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(s=m(t,r))||s.enumerable});return e};var w=e=>v(o({},"__esModule",{value:!0}),e);var T={};b(T,{defaults:()=>h,splitByW:()=>E,version:()=>O});var x={inclusiveRangeEnds:!1,returnMatchedRangeInsteadOfTrue:!1};function l(e,t,n){let s=a(a({},x),n);if(!Number.isInteger(e))throw new Error(`ranges-is-index-within: [THROW_ID_01] the first input argument should be string index, a natural number (or zero). It was given as ${e} (type ${typeof e})`);return Array.isArray(t)?s.returnMatchedRangeInsteadOfTrue?t.find(r=>s.inclusiveRangeEnds?e>=r[0]&&e<=r[1]:e>r[0]&&e<r[1])||!1:t.some(r=>s.inclusiveRangeEnds?e>=r[0]&&e<=r[1]:e>r[0]&&e<r[1]):!1}var g="3.2.4";var O=g,h={ignoreRanges:[]};function E(e,t){if(e===void 0)throw new Error("string-split-by-whitespace: [THROW_ID_01] The input is missing!");if(typeof e!="string")return e;if(e.trim()==="")return[];let n=a(a({},h),t);if(n.ignoreRanges.length&&!n.ignoreRanges.every(i=>Array.isArray(i)))throw new Error("string-split-by-whitespace: [THROW_ID_03] The resolvedOpts.ignoreRanges contains elements which are not arrays!");let s=null,r=[];for(let i=0,y=e.length;i<y;i++)s===null&&e[i].trim()&&(!n||!n.ignoreRanges||!n.ignoreRanges.length||n.ignoreRanges.length&&!l(i,n.ignoreRanges.map(p=>[p[0],p[1]-1]),{inclusiveRangeEnds:!0}))&&(s=i),s!==null&&(e[i].trim()?n.ignoreRanges.length&&l(i,n.ignoreRanges)?(r.push(e.slice(s,i-1)),s=null):e[i+1]===void 0&&r.push(e.slice(s,i+1)):(r.push(e.slice(s,i)),s=null));return r}return w(T);})();
|
|
11
11
|
/**
|
|
12
12
|
* @name ranges-is-index-within
|
|
13
13
|
* @fileoverview Checks if index is within any of the given string index ranges
|
|
14
|
-
* @version 3.2.
|
|
14
|
+
* @version 3.2.3
|
|
15
15
|
* @author Roy Revelt, Codsen Ltd
|
|
16
16
|
* @license MIT
|
|
17
17
|
* {@link https://codsen.com/os/ranges-is-index-within/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "string-split-by-whitespace",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Split string into array by chunks of whitespace",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"alt",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"ranges-is-index-within": "^3.2.
|
|
75
|
+
"ranges-is-index-within": "^3.2.3"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"string-find-heads-tails": "^5.1.
|
|
78
|
+
"string-find-heads-tails": "^5.1.4"
|
|
79
79
|
}
|
|
80
80
|
}
|