ranges-iterate 3.2.7 → 3.2.8
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 +21 -21
- package/dist/ranges-iterate.esm.js +2 -2
- package/dist/ranges-iterate.umd.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -67,58 +67,58 @@ Accidental version bump during migration to sourcehut. Sorry about that.
|
|
|
67
67
|
|
|
68
68
|
## 3.10.0 (2019-01-20)
|
|
69
69
|
|
|
70
|
-
-
|
|
71
|
-
-
|
|
70
|
+
- Various documentation and setup tweaks after we migrated to monorepo
|
|
71
|
+
- Setup refresh: updated dependencies and all config files using automated tools
|
|
72
72
|
|
|
73
73
|
## 3.6.0 (2018-12-26)
|
|
74
74
|
|
|
75
|
-
-
|
|
75
|
+
- Add `opts.progressFn` ([09de99c](https://gitlab.com/codsen/codsen/tree/master/packages/ranges-iterate/commits/09de99c))
|
|
76
76
|
|
|
77
77
|
## 3.5.0 (2018-11-29)
|
|
78
78
|
|
|
79
|
-
-
|
|
79
|
+
- Add `opts.progressFn` - if you pass a function, it will report the progress, calling that function with a number between `0` and `100`. It's not precise and meant to be used as an approximate progress indicator.
|
|
80
80
|
|
|
81
81
|
## 3.4.0 (2018-10-25)
|
|
82
82
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
83
|
+
- Updated all dependencies
|
|
84
|
+
- Restored coveralls.io reporting
|
|
85
|
+
- Restored unit test linting
|
|
86
86
|
|
|
87
87
|
## 3.3.0 (2018-06-11)
|
|
88
88
|
|
|
89
89
|
GitHub sold us out. In the meantime, we:
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
91
|
+
- Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
|
|
92
|
+
- Dropped BitHound (RIP) and Travis
|
|
93
|
+
- Removed `package-lock`
|
|
94
94
|
|
|
95
95
|
## 3.2.0 (2018-05-26)
|
|
96
96
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
97
|
+
- Set up [Prettier](https://prettier.io) on a custom ESLint rule set.
|
|
98
|
+
- Removed `package.lock` and `.editorconfig`
|
|
99
|
+
- 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.
|
|
100
|
+
- 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.
|
|
101
101
|
|
|
102
102
|
## 3.1.0 (2018-01-10)
|
|
103
103
|
|
|
104
|
-
-
|
|
104
|
+
- Updated all dependencies and setup in general
|
|
105
105
|
|
|
106
106
|
## 3.0.0 (2017-12-03)
|
|
107
107
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
108
|
+
- Set up Rollup, generating three builds: CommonJS, UMD and ES Modules
|
|
109
|
+
- Rebase the code to be natively in ES Modules
|
|
110
110
|
|
|
111
111
|
**PS. Bumping major just in case this breaks API endpoints.**
|
|
112
112
|
|
|
113
113
|
## 2.1.0 (2017-09-13)
|
|
114
114
|
|
|
115
|
-
-
|
|
116
|
-
-
|
|
115
|
+
- Add more description in readme
|
|
116
|
+
- Add more unit tests, including tests for examples used in readme
|
|
117
117
|
|
|
118
118
|
## 2.0.0 (2017-09-12)
|
|
119
119
|
|
|
120
|
-
-
|
|
120
|
+
- Add `opts.strictlyTwoElementsInRangeArrays` (default is `false`, differently from v1 which is opposite)
|
|
121
121
|
|
|
122
122
|
## 1.0.0 (2017-09-11)
|
|
123
123
|
|
|
124
|
-
-
|
|
124
|
+
- Initial release
|
|
@@ -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.2.
|
|
4
|
+
* @version 3.2.8
|
|
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 d="3.2.
|
|
10
|
+
var d="3.2.8";var f=d;function b(r,o,n,a=0){if(typeof r!="string")throw new TypeError(`ranges-iterate: [THROW_ID_01] Input string must be a string! It was given as ${typeof r}, equal to: ${JSON.stringify(r,null,0)}`);if(!r.length)throw new TypeError("ranges-iterate: [THROW_ID_02] Input string must be non-empty!");if(o&&!Array.isArray(o))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 o}, equal to: ${JSON.stringify(o,null,0)}`);if(n){if(typeof n!="function")throw new TypeError(`ranges-iterate: [THROW_ID_05] The calllback function (third input argument) must be a function. It was given as: ${typeof n}, equal to: ${JSON.stringify(n,null,0)}`)}else throw new TypeError("ranges-iterate: [THROW_ID_04] You should provide a callback function as third input argument!");if(o===null||!o.length)for(let e=0;e<r.length;e++)n({i:e,val:r[e]});else{let e=Array.from(o),s=a,t=a;if(t<e[0][0])for(;t<e[0][0]&&r[t];t++,s++)n({i:t,val:r[t]});e[0][0]<=s&&e.forEach((i,u)=>{if(i[2])for(let l=0,c=i[2].length;l<c;l++)n({i:t,val:i[2][l]}),t+=1;for(;s<i[1];)s+=1;let $=r.length;for(e[u+1]&&($=e[u+1][0]);s<$;t++,s++)n({i:t,val:r[s]})})}}export{b as rIterate,f as version};
|
|
@@ -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.2.
|
|
4
|
+
* @version 3.2.8
|
|
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
|
-
"use strict";var rangesIterate=(()=>{var u=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var n in r)u(e,n,{get:r[n],enumerable:!0})},y=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of g(r))!f.call(e,t)&&t!==n&&u(e,t,{get:()=>r[t],enumerable:!(i=m(r,t))||i.enumerable});return e};var x=e=>y(u({},"__esModule",{value:!0}),e);var E={};b(E,{rIterate:()=>v,version:()=>h});var c="3.2.
|
|
10
|
+
"use strict";var rangesIterate=(()=>{var u=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(e,r)=>{for(var n in r)u(e,n,{get:r[n],enumerable:!0})},y=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of g(r))!f.call(e,t)&&t!==n&&u(e,t,{get:()=>r[t],enumerable:!(i=m(r,t))||i.enumerable});return e};var x=e=>y(u({},"__esModule",{value:!0}),e);var E={};b(E,{rIterate:()=>v,version:()=>h});var c="3.2.8";var h=c;function v(e,r,n,i=0){if(typeof e!="string")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(r&&!Array.isArray(r))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 r}, equal to: ${JSON.stringify(r,null,0)}`);if(n){if(typeof n!="function")throw new TypeError(`ranges-iterate: [THROW_ID_05] The calllback function (third input argument) must be a function. It was given as: ${typeof n}, equal to: ${JSON.stringify(n,null,0)}`)}else throw new TypeError("ranges-iterate: [THROW_ID_04] You should provide a callback function as third input argument!");if(r===null||!r.length)for(let t=0;t<e.length;t++)n({i:t,val:e[t]});else{let t=Array.from(r),s=i,o=i;if(o<t[0][0])for(;o<t[0][0]&&e[o];o++,s++)n({i:o,val:e[o]});t[0][0]<=s&&t.forEach((l,$)=>{if(l[2])for(let a=0,p=l[2].length;a<p;a++)n({i:o,val:l[2][a]}),o+=1;for(;s<l[1];)s+=1;let d=e.length;for(t[$+1]&&(d=t[$+1][0]);s<d;o++,s++)n({i:o,val:e[s]})})}}return x(E);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-iterate",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.8",
|
|
4
4
|
"description": "Iterate a string and any changes within given string index ranges",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"ranges-apply": "^6.2.
|
|
72
|
-
"ranges-merge": "^8.2.
|
|
71
|
+
"ranges-apply": "^6.2.8",
|
|
72
|
+
"ranges-merge": "^8.2.3"
|
|
73
73
|
}
|
|
74
74
|
}
|