ranges-iterate 3.2.10 → 3.2.11
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/README.md +13 -16
- package/dist/ranges-iterate.esm.js +2 -2
- package/dist/ranges-iterate.umd.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">ranges-iterate</h1>
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
<p align="center">Iterate a string and any changes within given string index ranges</p>
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
<a href="https://www.npmjs.com/package/ranges-iterate" rel="nofollow noreferrer noopener">
|
|
7
|
-
<img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
|
|
8
|
-
</a>
|
|
5
|
+
<p align="center">
|
|
9
6
|
<a href="https://codsen.com/os/ranges-iterate" rel="nofollow noreferrer noopener">
|
|
10
7
|
<img src="https://img.shields.io/badge/-codsen-blue?style=flat-square" alt="page on codsen.com">
|
|
11
8
|
</a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/ranges-iterate" rel="nofollow noreferrer noopener">
|
|
10
|
+
<img src="https://img.shields.io/badge/-npm-blue?style=flat-square" alt="page on npm">
|
|
11
|
+
</a>
|
|
12
12
|
<a href="https://github.com/codsen/codsen/tree/main/packages/ranges-iterate" rel="nofollow noreferrer noopener">
|
|
13
13
|
<img src="https://img.shields.io/badge/-github-blue?style=flat-square" alt="page on github">
|
|
14
14
|
</a>
|
|
15
15
|
<a href="https://npmcharts.com/compare/ranges-iterate?interval=30" rel="nofollow noreferrer noopener" target="_blank">
|
|
16
16
|
<img src="https://img.shields.io/npm/dm/ranges-iterate.svg?style=flat-square" alt="Downloads per month">
|
|
17
17
|
</a>
|
|
18
|
-
<a href="https://
|
|
19
|
-
<img src="https://img.shields.io/badge/
|
|
20
|
-
</a>
|
|
21
|
-
<img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT License">
|
|
22
|
-
<a href="https://liberamanifesto.com" rel="nofollow noreferrer noopener" target="_blank">
|
|
23
|
-
<img src="https://img.shields.io/badge/libera-manifesto-lightgrey.svg?style=flat-square" alt="libera manifesto">
|
|
18
|
+
<a href="https://codsen.com/os/ranges-iterate/changelog" rel="nofollow noreferrer noopener">
|
|
19
|
+
<img src="https://img.shields.io/badge/changelog-here-brightgreen?style=flat-square" alt="changelog">
|
|
24
20
|
</a>
|
|
25
|
-
|
|
21
|
+
<img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT Licence">
|
|
22
|
+
</p>
|
|
26
23
|
|
|
27
24
|
## Install
|
|
28
25
|
|
|
@@ -69,8 +66,8 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
69
66
|
|
|
70
67
|
## Licence
|
|
71
68
|
|
|
72
|
-
MIT License
|
|
69
|
+
MIT License.
|
|
73
70
|
|
|
74
|
-
Copyright
|
|
71
|
+
Copyright © 2010-2022 Roy Revelt and other contributors.
|
|
75
72
|
|
|
76
|
-
<img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center">
|
|
73
|
+
<p align="center"><img src="https://codsen.com/images/png-codsen-ok.png" width="98" alt="ok" align="center"> <img src="https://codsen.com/images/png-codsen-1.png" width="148" alt="codsen" align="center"> <img src="https://codsen.com/images/png-codsen-star-small.png" width="32" alt="star" align="center"></p>
|
|
@@ -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.11
|
|
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.11";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.11
|
|
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.11";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.11",
|
|
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.11",
|
|
72
|
+
"ranges-merge": "^8.2.6"
|
|
73
73
|
}
|
|
74
74
|
}
|