ranges-process-outside 5.0.18 → 5.1.1
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
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 5.1.0 (2022-08-12)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- export types ([196863e](https://github.com/codsen/codsen/commit/196863eb3d68c318958cef269a9196c5163ffebe))
|
|
11
|
+
- export types ([11b5fb9](https://github.com/codsen/codsen/commit/11b5fb936ce20e0a77c3a09806773e1cd7695c50))
|
|
12
|
+
|
|
6
13
|
## 5.0.0 (2021-09-09)
|
|
7
14
|
|
|
8
15
|
### Features
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name ranges-process-outside
|
|
3
3
|
* @fileoverview Iterate string considering ranges, as if they were already applied
|
|
4
|
-
* @version 5.
|
|
4
|
+
* @version 5.1.1
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-process-outside/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import m from"runes";import{rInvert as y}from"ranges-invert";import{rCrop as g}from"ranges-crop";var p="5.
|
|
10
|
+
import m from"runes";import{rInvert as y}from"ranges-invert";import{rCrop as g}from"ranges-crop";var p="5.1.1";var D=p;function v(e,t,s,i=!1){if(typeof e!="string")throw e===void 0?new Error("ranges-process-outside: [THROW_ID_01] the first input argument must be string! It's missing currently (undefined)!"):new Error(`ranges-process-outside: [THROW_ID_02] the first input argument must be string! It was given as:
|
|
11
11
|
${JSON.stringify(e,null,4)} (type ${typeof e})`);if(t&&(!Array.isArray(t)||t.length&&!Array.isArray(t[0])))throw new Error(`ranges-process-outside: [THROW_ID_03] the second input argument must be array of ranges or null! It was given as:
|
|
12
|
-
${JSON.stringify(t,null,4)} (type ${typeof t})`);if(typeof
|
|
13
|
-
${JSON.stringify(
|
|
12
|
+
${JSON.stringify(t,null,4)} (type ${typeof t})`);if(typeof s!="function")throw new Error(`ranges-process-outside: [THROW_ID_04] the third input argument must be a function! It was given as:
|
|
13
|
+
${JSON.stringify(s,null,4)} (type ${typeof s})`);function u(n,d){(d||[]).forEach(([c,a])=>{for(let r=c;r<a;r++){let o=m(n.slice(r))[0].length;s(r,r+o,l=>{l!=null&&(r+=l)}),o&&o>1&&(r+=o-1)}})}if(t?.length){let n=g(y(t,e.length,{skipChecks:!!i}),e.length);u(e,n)}else u(e,[[0,e.length]])}export{v as rProcessOutside,D as version};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
2
|
* @name ranges-process-outside
|
|
3
3
|
* @fileoverview Iterate string considering ranges, as if they were already applied
|
|
4
|
-
* @version 5.
|
|
4
|
+
* @version 5.1.1
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/ranges-process-outside/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var rangesProcessOutside=(()=>{var C=Object.create;var p=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols,W=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var O=(e,r,s)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,f=(e,r)=>{for(var s in r||(r={}))E.call(r,s)&&O(e,s,r[s]);if(R)for(var s of R(r))J.call(r,s)&&O(e,s,r[s]);return e};var M=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),k=(e,r)=>{for(var s in r)p(e,s,{get:r[s],enumerable:!0})},_=(e,r,s,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of H(r))!E.call(e,o)&&o!==s&&p(e,o,{get:()=>r[o],enumerable:!(t=F(r,o))||t.enumerable});return e};var V=(e,r,s)=>(s=e!=null?C(W(e)):{},_(r||!e||!e.__esModule?p(s,"default",{value:e,enumerable:!0}):s,e)),G=e=>_(p({},"__esModule",{value:!0}),e);var x=M((se,I)=>{"use strict";var j=[776,2359,2359,2367,2367,2984,3007,3021,3633,3635,3648,3657,4352,4449,4520];function b(e){if(typeof e!="string")throw new Error("string cannot be undefined or null");let r=[],s=0,t=0;for(;s<e.length;){if(t+=L(s+t,e),Z(e[s+t])&&t++,K(e[s+t])&&t++,U(e[s+t])&&t++,Y(e[s+t])){t++;continue}r.push(e.substring(s,s+t)),s+=t,t=0}return r}function L(e,r){let s=r[e];if(!P(s)||e===r.length-1)return 1;let t=s+r[e+1],o=r.substring(e+2,e+5);return w(t)&&w(o)||q(o)?4:2}function P(e){return e&&y(e[0].charCodeAt(0),55296,56319)}function w(e){return y($(e),127462,127487)}function q(e){return y($(e),127995,127999)}function K(e){return typeof e=="string"&&y(e.charCodeAt(0),65024,65039)}function U(e){return typeof e=="string"&&y(e.charCodeAt(0),8400,8447)}function Z(e){return typeof e=="string"&&j.indexOf(e.charCodeAt(0))!==-1}function Y(e){return typeof e=="string"&&e.charCodeAt(0)===8205}function $(e){let r=e.charCodeAt(0)-55296,s=e.charCodeAt(1)-56320;return(r<<10)+s+65536}function y(e,r,s){return e>=r&&e<=s}function B(e,r,s){let t=b(e);if(r===void 0)return e;if(r>=t.length)return"";let o=t.length-r,l=r+(s===void 0?o:s);return l>r+o&&(l=void 0),t.slice(r,l).join("")}I.exports=b;I.exports.substr=B});var ne={};k(ne,{rProcessOutside:()=>re,version:()=>ee});var S=V(x(),1);var z={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function A(e,r){if(!Array.isArray(e)||!e.length)return e;let s=f(f({},z),r),t,o;if(s.strictlyTwoElementsInRangeArrays&&!e.every((u,a)=>!Array.isArray(u)||u.length!==2?(t=a,o=u.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${t}th range (${JSON.stringify(e[t],null,4)}) has not two but ${o} elements!`);if(!e.every((u,a)=>!Array.isArray(u)||!Number.isInteger(u[0])||u[0]<0||!Number.isInteger(u[1])||u[1]<0?(t=a,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${t}th range (${JSON.stringify(e[t],null,4)}) does not consist of only natural numbers!`);let i=e.length**2,l=0;return Array.from(e).sort((u,a)=>(s.progressFn&&(l+=1,s.progressFn(Math.floor(l*100/i))),u[0]===a[0]?u[1]<a[1]?-1:u[1]>a[1]?1:0:u[0]<a[0]?-1:1))}var D={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function d(e,r){function s(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}if(!Array.isArray(e)||!e.length)return null;let t;if(r)if(s(r)){if(t=f(f({},D),r),t.progressFn&&s(t.progressFn)&&!Object.keys(t.progressFn).length)t.progressFn=null;else if(t.progressFn&&typeof t.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof t.progressFn}", equal to ${JSON.stringify(t.progressFn,null,4)}`);if(![1,2,"1","2"].includes(t.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof t.mergeType}", equal to ${JSON.stringify(t.mergeType,null,4)}`);if(typeof t.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof t.joinRangesThatTouchEdges}", equal to ${JSON.stringify(t.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
10
|
+
"use strict";var rangesProcessOutside=(()=>{var C=Object.create;var p=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols,W=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var O=(e,r,s)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,f=(e,r)=>{for(var s in r||(r={}))E.call(r,s)&&O(e,s,r[s]);if(R)for(var s of R(r))J.call(r,s)&&O(e,s,r[s]);return e};var M=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),k=(e,r)=>{for(var s in r)p(e,s,{get:r[s],enumerable:!0})},_=(e,r,s,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of H(r))!E.call(e,o)&&o!==s&&p(e,o,{get:()=>r[o],enumerable:!(t=F(r,o))||t.enumerable});return e};var V=(e,r,s)=>(s=e!=null?C(W(e)):{},_(r||!e||!e.__esModule?p(s,"default",{value:e,enumerable:!0}):s,e)),G=e=>_(p({},"__esModule",{value:!0}),e);var x=M((se,I)=>{"use strict";var j=[776,2359,2359,2367,2367,2984,3007,3021,3633,3635,3648,3657,4352,4449,4520];function b(e){if(typeof e!="string")throw new Error("string cannot be undefined or null");let r=[],s=0,t=0;for(;s<e.length;){if(t+=L(s+t,e),Z(e[s+t])&&t++,K(e[s+t])&&t++,U(e[s+t])&&t++,Y(e[s+t])){t++;continue}r.push(e.substring(s,s+t)),s+=t,t=0}return r}function L(e,r){let s=r[e];if(!P(s)||e===r.length-1)return 1;let t=s+r[e+1],o=r.substring(e+2,e+5);return w(t)&&w(o)||q(o)?4:2}function P(e){return e&&y(e[0].charCodeAt(0),55296,56319)}function w(e){return y($(e),127462,127487)}function q(e){return y($(e),127995,127999)}function K(e){return typeof e=="string"&&y(e.charCodeAt(0),65024,65039)}function U(e){return typeof e=="string"&&y(e.charCodeAt(0),8400,8447)}function Z(e){return typeof e=="string"&&j.indexOf(e.charCodeAt(0))!==-1}function Y(e){return typeof e=="string"&&e.charCodeAt(0)===8205}function $(e){let r=e.charCodeAt(0)-55296,s=e.charCodeAt(1)-56320;return(r<<10)+s+65536}function y(e,r,s){return e>=r&&e<=s}function B(e,r,s){let t=b(e);if(r===void 0)return e;if(r>=t.length)return"";let o=t.length-r,l=r+(s===void 0?o:s);return l>r+o&&(l=void 0),t.slice(r,l).join("")}I.exports=b;I.exports.substr=B});var ne={};k(ne,{rProcessOutside:()=>re,version:()=>ee});var S=V(x(),1);var z={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function A(e,r){if(!Array.isArray(e)||!e.length)return e;let s=f(f({},z),r),t,o;if(s.strictlyTwoElementsInRangeArrays&&!e.every((u,a)=>!Array.isArray(u)||u.length!==2?(t=a,o=u.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${t}th range (${JSON.stringify(e[t],null,4)}) has not two but ${o} elements!`);if(!e.every((u,a)=>!Array.isArray(u)||!Number.isInteger(u[0])||u[0]<0||!Number.isInteger(u[1])||u[1]<0?(t=a,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${t}th range (${JSON.stringify(e[t],null,4)}) does not consist of only natural numbers!`);let i=e.length**2,l=0;return Array.from(e).sort((u,a)=>(s.progressFn&&(l+=1,s.progressFn(Math.floor(l*100/i))),u[0]===a[0]?u[1]<a[1]?-1:u[1]>a[1]?1:0:u[0]<a[0]?-1:1))}var D={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function d(e,r){function s(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}if(!Array.isArray(e)||!e.length)return null;let t;if(r)if(s(r)){if(t=f(f({},D),r),t.progressFn&&s(t.progressFn)&&!Object.keys(t.progressFn).length)t.progressFn=null;else if(t.progressFn&&typeof t.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof t.progressFn}", equal to ${JSON.stringify(t.progressFn,null,4)}`);if(![1,2,"1","2"].includes(t.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof t.mergeType}", equal to ${JSON.stringify(t.mergeType,null,4)}`);if(typeof t.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof t.joinRangesThatTouchEdges}", equal to ${JSON.stringify(t.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
11
11
|
${JSON.stringify(r,null,4)} (type ${typeof r})`);else t=f({},D);let o=e.filter(n=>Array.isArray(n)).map(n=>[...n]).filter(n=>n[2]!==void 0||n[0]!==n[1]),i,l,u;t.progressFn?i=A(o,{progressFn:n=>{u=Math.floor(n/5),u!==l&&(l=u,t.progressFn(u))}}):i=A(o);let a=i.length-1;for(let n=a;n>0;n--)t.progressFn&&(u=Math.floor((1-n/a)*78)+21,u!==l&&u>l&&(l=u,t.progressFn(u))),(i[n][0]<=i[n-1][0]||!t.joinRangesThatTouchEdges&&i[n][0]<i[n-1][1]||t.joinRangesThatTouchEdges&&i[n][0]<=i[n-1][1])&&(i[n-1][0]=Math.min(i[n][0],i[n-1][0]),i[n-1][1]=Math.max(i[n][1],i[n-1][1]),i[n][2]!==void 0&&(i[n-1][0]>=i[n][0]||i[n-1][1]<=i[n][1])&&i[n-1][2]!==null&&(i[n][2]===null&&i[n-1][2]!==null?i[n-1][2]=null:i[n-1][2]!=null?+t.mergeType==2&&i[n-1][0]===i[n][0]?i[n-1][2]=i[n][2]:i[n-1][2]+=i[n][2]:i[n-1][2]=i[n][2]),i.splice(n,1),n=i.length);return i.length?i:null}function m(e,r){if(e===null)return null;if(!Array.isArray(e))throw new TypeError(`ranges-crop: [THROW_ID_01] The first input's argument must be an array, consisting of range arrays! Currently its type is: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(r))throw new TypeError(`ranges-crop: [THROW_ID_02] The second input's argument must be a natural number or zero (coming from String.length)! Currently its type is: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!e.filter(o=>o).length)return e.filter(o=>o);let s=0;if(!e.filter(o=>o).every((o,i)=>!Number.isInteger(o[0])||!Number.isInteger(o[1])?(s=i,!1):!0))throw Array.isArray(e)&&typeof e[0]=="number"&&typeof e[1]=="number"?new TypeError(`ranges-crop: [THROW_ID_03] The first argument should be AN ARRAY OF RANGES, not a single range! Currently arrOfRanges = ${JSON.stringify(e,null,0)}!`):new TypeError(`ranges-crop: [THROW_ID_04] The first argument should be AN ARRAY OF ARRAYS! Each sub-array means string slice indexes. In our case, here ${s}th range (${JSON.stringify(e[s],null,0)}) does not consist of only natural numbers!`);if(!e.filter(o=>o).every((o,i)=>o[2]!=null&&typeof o[2]!="string"?(s=i,!1):!0))throw new TypeError(`ranges-crop: [THROW_ID_05] The third argument, if present at all, should be of a string-type or null. Currently the ${s}th range ${JSON.stringify(e[s],null,0)} has a argument in the range of a type ${typeof e[s][2]}`);let t=(d(e)||[]).filter(o=>o[0]<=r&&(o[2]!=null||o[0]<r)).map(o=>o[1]>r?o[2]!=null?[o[0],r,o[2]]:[o[0],r]:o);return t.length?t:null}var Q={strictlyTwoElementsInRangeArrays:!1,skipChecks:!1};function N(e,r,s){if(!Array.isArray(e)&&e!==null)throw new TypeError(`ranges-invert: [THROW_ID_01] Input's first argument must be an array, consisting of range arrays! Currently its type is: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(r)||r<0)throw new TypeError(`ranges-invert: [THROW_ID_02] Input's second argument must be a natural number or zero (coming from String.length)! Currently its type is: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(Array.isArray(e)&&typeof e[0]=="number"&&typeof e[1]=="number")throw new TypeError(`ranges-invert: [THROW_ID_07] The first argument should be AN ARRAY OF RANGES, not a single range! Currently arrOfRanges = ${JSON.stringify(e,null,0)}!`);if(!Array.isArray(e)||!e.filter(a=>Array.isArray(a)&&a[0]!==a[1]).length||!r)return r?[[0,r]]:null;let t=f(f({},Q),s),o=0,i;if(!t.skipChecks&&t.strictlyTwoElementsInRangeArrays&&!e.filter(a=>a).every((a,n)=>a.length!==2?(o=n,i=a.length,!1):!0))throw new TypeError(`ranges-invert: [THROW_ID_04] Because opts.strictlyTwoElementsInRangeArrays was enabled, all ranges must be strictly two-element-long. However, the ${o}th range (${JSON.stringify(e[o],null,0)}) has not two but ${i} elements!`);if(!t.skipChecks&&!e.every((a,n)=>!Number.isInteger(a[0])||a[0]<0||!Number.isInteger(a[1])||a[1]<0?(o=n,!1):!0))throw new TypeError(`ranges-invert: [THROW_ID_05] The first argument should be AN ARRAY OF ARRAYS! Each sub-array means string slice indexes. In our case, here ${o+1}th range (${JSON.stringify(e[o],null,0)}) does not consist of only natural numbers!`);let l;t.skipChecks?l=e.filter(a=>a[0]!==a[1]):l=d(e.filter(a=>a[0]!==a[1]));let u=l.reduce((a,n,g,c)=>{let T=[];g===0&&c[0][0]!==0&&T.push([0,c[0][0]]);let h=g<c.length-1?c[g+1][0]:r;if(n[1]!==h){if(t.skipChecks&&n[1]>h)throw new TypeError(`ranges-invert: [THROW_ID_08] The checking (opts.skipChecks) is off and input ranges were not sorted! We nearly wrote range [${n[1]}, ${h}] which is backwards. For investigation, whole ranges array is:
|
|
12
|
-
${JSON.stringify(c,null,0)}`);T.push([n[1],h])}return a.concat(T)},[]);return m(u,r)}var v="5.
|
|
12
|
+
${JSON.stringify(c,null,0)}`);T.push([n[1],h])}return a.concat(T)},[]);return m(u,r)}var v="5.1.1";var ee=v;function re(e,r,s,t=!1){if(typeof e!="string")throw e===void 0?new Error("ranges-process-outside: [THROW_ID_01] the first input argument must be string! It's missing currently (undefined)!"):new Error(`ranges-process-outside: [THROW_ID_02] the first input argument must be string! It was given as:
|
|
13
13
|
${JSON.stringify(e,null,4)} (type ${typeof e})`);if(r&&(!Array.isArray(r)||r.length&&!Array.isArray(r[0])))throw new Error(`ranges-process-outside: [THROW_ID_03] the second input argument must be array of ranges or null! It was given as:
|
|
14
14
|
${JSON.stringify(r,null,4)} (type ${typeof r})`);if(typeof s!="function")throw new Error(`ranges-process-outside: [THROW_ID_04] the third input argument must be a function! It was given as:
|
|
15
15
|
${JSON.stringify(s,null,4)} (type ${typeof s})`);function o(i,l){(l||[]).forEach(([u,a])=>{for(let n=u;n<a;n++){let g=(0,S.default)(i.slice(n))[0].length;s(n,n+g,c=>{c!=null&&(n+=c)}),g&&g>1&&(n+=g-1)}})}if(r!=null&&r.length){let i=m(N(r,e.length,{skipChecks:!!t}),e.length);o(e,i)}else o(e,[[0,e.length]])}return G(ne);})();
|
|
16
16
|
/**
|
|
17
17
|
* @name ranges-crop
|
|
18
18
|
* @fileoverview Crop array of ranges when they go beyond the reference string's length
|
|
19
|
-
* @version 5.1
|
|
19
|
+
* @version 5.2.1
|
|
20
20
|
* @author Roy Revelt, Codsen Ltd
|
|
21
21
|
* @license MIT
|
|
22
22
|
* {@link https://codsen.com/os/ranges-crop/}
|
|
@@ -24,7 +24,7 @@ ${JSON.stringify(s,null,4)} (type ${typeof s})`);function o(i,l){(l||[]).forEach
|
|
|
24
24
|
/**
|
|
25
25
|
* @name ranges-invert
|
|
26
26
|
* @fileoverview Invert string index ranges
|
|
27
|
-
* @version 5.1
|
|
27
|
+
* @version 5.2.1
|
|
28
28
|
* @author Roy Revelt, Codsen Ltd
|
|
29
29
|
* @license MIT
|
|
30
30
|
* {@link https://codsen.com/os/ranges-invert/}
|
|
@@ -32,7 +32,7 @@ ${JSON.stringify(s,null,4)} (type ${typeof s})`);function o(i,l){(l||[]).forEach
|
|
|
32
32
|
/**
|
|
33
33
|
* @name ranges-merge
|
|
34
34
|
* @fileoverview Merge and sort string index ranges
|
|
35
|
-
* @version 8.1
|
|
35
|
+
* @version 8.2.1
|
|
36
36
|
* @author Roy Revelt, Codsen Ltd
|
|
37
37
|
* @license MIT
|
|
38
38
|
* {@link https://codsen.com/os/ranges-merge/}
|
|
@@ -40,7 +40,7 @@ ${JSON.stringify(s,null,4)} (type ${typeof s})`);function o(i,l){(l||[]).forEach
|
|
|
40
40
|
/**
|
|
41
41
|
* @name ranges-sort
|
|
42
42
|
* @fileoverview Sort string index ranges
|
|
43
|
-
* @version 5.
|
|
43
|
+
* @version 5.1.1
|
|
44
44
|
* @author Roy Revelt, Codsen Ltd
|
|
45
45
|
* @license MIT
|
|
46
46
|
* {@link https://codsen.com/os/ranges-sort/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ranges-process-outside",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Iterate string considering ranges, as if they were already applied",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"array",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"sort",
|
|
10
10
|
"string"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://codsen.com/os/ranges-process-outside
|
|
12
|
+
"homepage": "https://codsen.com/os/ranges-process-outside",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/codsen/codsen.git",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"ranges-crop": "^5.1
|
|
67
|
-
"ranges-invert": "^5.1
|
|
66
|
+
"ranges-crop": "^5.2.1",
|
|
67
|
+
"ranges-invert": "^5.2.1",
|
|
68
68
|
"runes": "^0.4.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ranges } from "ranges-crop";
|
|
2
|
+
export { Ranges } from "ranges-crop";
|
|
2
3
|
|
|
3
4
|
declare const version: string;
|
|
4
5
|
declare type OffsetValueCb = (amountToOffset: number) => void;
|
|
@@ -14,4 +15,4 @@ declare function rProcessOutside(
|
|
|
14
15
|
skipChecks?: boolean
|
|
15
16
|
): void;
|
|
16
17
|
|
|
17
|
-
export { rProcessOutside, version };
|
|
18
|
+
export { Callback, OffsetValueCb, rProcessOutside, version };
|