ranges-iterate 4.0.20 → 4.0.29

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.
@@ -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.20
4
+ * @version 4.0.29
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.20";var f=m;function b(t,i,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(i&&!Array.isArray(i))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 i}, equal to: ${JSON.stringify(i,null,0)}`);if(r){if(typeof r!="function")throw new TypeError(`ranges-iterate: [THROW_ID_05] The callback 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(i?.length){let e=Array.from(i),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((s,u)=>{if(s[2])for(let l=0,$=s[2].length;l<$;l++)r({i:n,val:s[2][l]}),n+=1;for(;o<s[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};
10
+ var m="4.0.29";var f=m;function b(t,i,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(i&&!Array.isArray(i))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 i}, equal to: ${JSON.stringify(i,null,0)}`);if(r){if(typeof r!="function")throw new TypeError(`ranges-iterate: [THROW_ID_05] The callback 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(i?.length){let e=Array.from(i),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((s,u)=>{if(s[2])for(let l=0,$=s[2].length;l<$;l++)r({i:n,val:s[2][l]}),n+=1;for(;o<s[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.20
4
+ * @version 4.0.29
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.20";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 callback 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);})();
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.29";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 ".concat(typeof e,", equal to: ").concat(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: ".concat(typeof t,", equal to: ").concat(JSON.stringify(t,null,0)));if(n){if(typeof n!="function")throw new TypeError("ranges-iterate: [THROW_ID_05] The callback function (third input argument) must be a function. It was given as: ".concat(typeof n,", equal to: ").concat(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,p)=>{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 m=e.length;for(r[p+1]&&(m=r[p+1][0]);s<m;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.20",
3
+ "version": "4.0.29",
4
4
  "description": "Iterate a string and any changes within given string index ranges",
5
5
  "keywords": [
6
6
  "array",
@@ -42,7 +42,7 @@
42
42
  "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
43
43
  "examples": "node '../../ops/scripts/run-examples.js'",
44
44
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
45
- "letspublish": "npm publish || :",
45
+ "letspublish": "npm publish --provenance || :",
46
46
  "lint": "eslint . --fix",
47
47
  "perf": "node perf/check.js",
48
48
  "prep": "echo 'ready'",
@@ -70,7 +70,10 @@
70
70
  }
71
71
  },
72
72
  "devDependencies": {
73
- "ranges-apply": "^7.0.20",
74
- "ranges-merge": "^9.0.19"
73
+ "ranges-apply": "^7.0.29",
74
+ "ranges-merge": "^9.0.28"
75
+ },
76
+ "publishConfig": {
77
+ "registry": "https://registry.npmjs.org/"
75
78
  }
76
79
  }