ranges-iterate 3.0.6 → 3.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.
- package/dist/ranges-iterate.esm.js +2 -2
- package/dist/ranges-iterate.umd.js +2 -2
- package/package.json +10 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-iterate
|
|
3
3
|
* @fileoverview Iterate a string and any changes within given string index ranges
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-iterate/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var version$1 = "3.0.
|
|
10
|
+
var version$1 = "3.0.7";
|
|
11
11
|
|
|
12
12
|
const version = version$1;
|
|
13
13
|
function rIterate(str, originalRanges, cb, offset = 0) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-iterate
|
|
3
3
|
* @fileoverview Iterate a string and any changes within given string index ranges
|
|
4
|
-
* @version 3.0.
|
|
4
|
+
* @version 3.0.7
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-iterate/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rangesIterate={})}(this,(function(e){"use strict";e.rIterate=function(e,t,r,n=0){if("string"!=typeof e)throw new TypeError(`ranges-iterate: [THROW_ID_01] Input string must be a string! It was given as ${typeof e}, equal to: ${JSON.stringify(e,null,0)}`);if(!e.length)throw new TypeError("ranges-iterate: [THROW_ID_02] Input string must be non-empty!");if(t&&!Array.isArray(t))throw new TypeError(`ranges-iterate: [THROW_ID_03] Input ranges must be an array, consisting of zero or more arrays! Currently its type is: ${typeof t}, equal to: ${JSON.stringify(t,null,0)}`);if(!r)throw new TypeError("ranges-iterate: [THROW_ID_04] You should provide a callback function as third input argument!");if("function"!=typeof r)throw new TypeError(`ranges-iterate: [THROW_ID_05] The calllback function (third input argument) must be a function. It was given as: ${typeof r}, equal to: ${JSON.stringify(r,null,0)}`);if(null!==t&&t.length){const i=Array.from(t);let o=n,a=n;if(a<i[0][0])for(;a<i[0][0]&&e[a];a++,o++)r({i:a,val:e[a]});i[0][0]<=o&&i.forEach(((t,n)=>{if(t[2])for(let e=0,n=t[2].length;e<n;e++)r({i:a,val:t[2][e]}),a+=1;for(;o<t[1];)o+=1;let f=e.length;for(i[n+1]&&(f=i[n+1][0]);o<f;a++,o++)r({i:a,val:e[o]})}))}else for(let t=0;t<e.length;t++)r({i:t,val:e[t]})},e.version="3.0.
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rangesIterate={})}(this,(function(e){"use strict";e.rIterate=function(e,t,r,n=0){if("string"!=typeof e)throw new TypeError(`ranges-iterate: [THROW_ID_01] Input string must be a string! It was given as ${typeof e}, equal to: ${JSON.stringify(e,null,0)}`);if(!e.length)throw new TypeError("ranges-iterate: [THROW_ID_02] Input string must be non-empty!");if(t&&!Array.isArray(t))throw new TypeError(`ranges-iterate: [THROW_ID_03] Input ranges must be an array, consisting of zero or more arrays! Currently its type is: ${typeof t}, equal to: ${JSON.stringify(t,null,0)}`);if(!r)throw new TypeError("ranges-iterate: [THROW_ID_04] You should provide a callback function as third input argument!");if("function"!=typeof r)throw new TypeError(`ranges-iterate: [THROW_ID_05] The calllback function (third input argument) must be a function. It was given as: ${typeof r}, equal to: ${JSON.stringify(r,null,0)}`);if(null!==t&&t.length){const i=Array.from(t);let o=n,a=n;if(a<i[0][0])for(;a<i[0][0]&&e[a];a++,o++)r({i:a,val:e[a]});i[0][0]<=o&&i.forEach(((t,n)=>{if(t[2])for(let e=0,n=t[2].length;e<n;e++)r({i:a,val:t[2][e]}),a+=1;for(;o<t[1];)o+=1;let f=e.length;for(i[n+1]&&(f=i[n+1][0]);o<f;a++,o++)r({i:a,val:e[o]})}))}else for(let t=0;t<e.length;t++)r({i:t,val:e[t]})},e.version="3.0.7",Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-iterate",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "Iterate a string and any changes within given string index ranges",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -100,23 +100,23 @@
|
|
|
100
100
|
"@rollup/plugin-node-resolve": "^13.0.6",
|
|
101
101
|
"@rollup/plugin-strip": "^2.1.0",
|
|
102
102
|
"@rollup/plugin-typescript": "^8.3.0",
|
|
103
|
-
"@types/node": "^16.11.
|
|
103
|
+
"@types/node": "^16.11.10",
|
|
104
104
|
"@types/tap": "^15.0.5",
|
|
105
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
106
|
-
"@typescript-eslint/parser": "^5.
|
|
107
|
-
"core-js": "^3.19.
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
|
106
|
+
"@typescript-eslint/parser": "^5.5.0",
|
|
107
|
+
"core-js": "^3.19.2",
|
|
108
108
|
"cross-env": "^7.0.3",
|
|
109
109
|
"eslint": "^8.3.0",
|
|
110
|
-
"lect": "^0.18.
|
|
111
|
-
"ranges-apply": "^6.0.
|
|
112
|
-
"ranges-merge": "^8.0.
|
|
113
|
-
"rollup": "^2.60.
|
|
110
|
+
"lect": "^0.18.7",
|
|
111
|
+
"ranges-apply": "^6.0.7",
|
|
112
|
+
"ranges-merge": "^8.0.7",
|
|
113
|
+
"rollup": "^2.60.1",
|
|
114
114
|
"rollup-plugin-ascii": "^0.0.3",
|
|
115
115
|
"rollup-plugin-banner": "^0.2.1",
|
|
116
116
|
"rollup-plugin-cleanup": "^3.2.1",
|
|
117
117
|
"rollup-plugin-dts": "^4.0.1",
|
|
118
118
|
"rollup-plugin-terser": "^7.0.2",
|
|
119
|
-
"tap": "^15.1.
|
|
119
|
+
"tap": "^15.1.5",
|
|
120
120
|
"tslib": "^2.3.1",
|
|
121
121
|
"typescript": "^4.5.2"
|
|
122
122
|
},
|