ranges-iterate 4.0.13 → 4.0.15
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/ranges-iterate.esm.js +2 -2
- package/dist/ranges-iterate.umd.js +2 -2
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2024 Roy Revelt and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
6
|
a copy of this software and associated documentation files (the
|
package/README.md
CHANGED
|
@@ -68,6 +68,6 @@ To report bugs or request features or assistance, [raise an issue](https://githu
|
|
|
68
68
|
|
|
69
69
|
MIT License.
|
|
70
70
|
|
|
71
|
-
Copyright © 2010-
|
|
71
|
+
Copyright © 2010-2024 Roy Revelt and other contributors.
|
|
72
72
|
|
|
73
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 4.0.
|
|
4
|
+
* @version 4.0.15
|
|
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 m="4.0.
|
|
10
|
+
var m="4.0.15";var f=m;function b(t,s,r,a=0){if(typeof t!="string")throw new TypeError(`ranges-iterate: [THROW_ID_01] Input string must be a string! It was given as ${typeof t}, equal to: ${JSON.stringify(t,null,0)}`);if(!t.length)throw new TypeError("ranges-iterate: [THROW_ID_02] Input string must be non-empty!");if(s&&!Array.isArray(s))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 s}, equal to: ${JSON.stringify(s,null,0)}`);if(r){if(typeof r!="function")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)}`)}else throw new TypeError("ranges-iterate: [THROW_ID_04] You should provide a callback function as third input argument!");if(s?.length){let e=Array.from(s),o=a,n=a;if(n<e[0][0])for(;n<e[0][0]&&t[n];n++,o++)r({i:n,val:t[n]});e[0][0]<=o&&e.forEach((i,u)=>{if(i[2])for(let l=0,$=i[2].length;l<$;l++)r({i:n,val:i[2][l]}),n+=1;for(;o<i[1];)o+=1;let p=t.length;for(e[u+1]&&(p=e[u+1][0]);o<p;n++,o++)r({i:n,val:t[o]})})}else for(let e=0;e<t.length;e++)r({i:e,val:t[e]})}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 4.0.
|
|
4
|
+
* @version 4.0.15
|
|
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 d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},x=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!f.call(e,r)&&r!==n&&u(e,r,{get:()=>t[r],enumerable:!(i=d(t,r))||i.enumerable});return e};var y=e=>x(u({},"__esModule",{value:!0}),e);var E={};b(E,{rIterate:()=>v,version:()=>h});var $="4.0.
|
|
10
|
+
"use strict";var rangesIterate=(()=>{var u=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},x=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of g(t))!f.call(e,r)&&r!==n&&u(e,r,{get:()=>t[r],enumerable:!(i=d(t,r))||i.enumerable});return e};var y=e=>x(u({},"__esModule",{value:!0}),e);var E={};b(E,{rIterate:()=>v,version:()=>h});var $="4.0.15";var h=$;function v(e,t,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(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(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(t!=null&&t.length){let r=Array.from(t),s=i,o=i;if(o<r[0][0])for(;o<r[0][0]&&e[o];o++,s++)n({i:o,val:e[o]});r[0][0]<=s&&r.forEach((l,m)=>{if(l[2])for(let a=0,c=l[2].length;a<c;a++)n({i:o,val:l[2][a]}),o+=1;for(;s<l[1];)s+=1;let p=e.length;for(r[m+1]&&(p=r[m+1][0]);s<p;o++,s++)n({i:o,val:e[s]})})}else for(let r=0;r<e.length;r++)n({i:r,val:e[r]})}return y(E);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-iterate",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"description": "Iterate a string and any changes within given string index ranges",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"ranges-apply": "^7.0.
|
|
74
|
-
"ranges-merge": "^9.0.
|
|
73
|
+
"ranges-apply": "^7.0.15",
|
|
74
|
+
"ranges-merge": "^9.0.15"
|
|
75
75
|
}
|
|
76
76
|
}
|