@teselagen/range-utils 0.0.2
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/adjustRangeToDeletionOfAnotherRange.d.ts +1 -0
- package/adjustRangeToInsert.d.ts +1 -0
- package/adjustRangeToRotation.d.ts +1 -0
- package/checkIfNonCircularRangesOverlap.d.ts +1 -0
- package/checkIfPotentiallyCircularRangesOverlap.d.ts +1 -0
- package/collapseOverlapsGeneratedFromRangeComparisonIfPossible.d.ts +1 -0
- package/convertRangeIndices.d.ts +1 -0
- package/convertRangeTo0Based.d.ts +1 -0
- package/convertRangeTo1Based.d.ts +1 -0
- package/doesRangeSpanEntireSequence.d.ts +1 -0
- package/doesRangeSpanOrigin.d.ts +1 -0
- package/expandOrContractCircularRangeToPosition.d.ts +4 -0
- package/expandOrContractNonCircularRangeToPosition.d.ts +4 -0
- package/expandOrContractRangeByLength.d.ts +1 -0
- package/expandOrContractRangeToPosition.d.ts +4 -0
- package/flipContainedRange.d.ts +1 -0
- package/generateRandomRange.d.ts +4 -0
- package/getAnnotationRangeType.d.ts +1 -0
- package/getEachPositionInRangeAsArray.d.ts +1 -0
- package/getLengthOfOverlappingRegionsBetweenTwoRanges.d.ts +1 -0
- package/getMiddleOfRange.d.ts +1 -0
- package/getOverlapOfNonCircularRanges.d.ts +4 -0
- package/getOverlapsOfPotentiallyCircularRanges.d.ts +1 -0
- package/getPositionFromAngle.d.ts +1 -0
- package/getRangeAngles.d.ts +7 -0
- package/getRangeLength.d.ts +2 -0
- package/getRangesBetweenTwoRanges.d.ts +1 -0
- package/getSequenceWithinRange.d.ts +1 -0
- package/getShortestDistanceBetweenTwoPositions.d.ts +1 -0
- package/getYOffsetForPotentiallyCircularRange.d.ts +1 -0
- package/getYOffsetsForPotentiallyCircularRanges.d.ts +4 -0
- package/getZeroedRangeOverlaps.d.ts +1 -0
- package/index.d.ts +51 -0
- package/index.js +27 -0
- package/index.mjs +4211 -0
- package/invertRange.d.ts +2 -0
- package/isPositionCloserToRangeStartThanRangeEnd.d.ts +1 -0
- package/isPositionWithinRange.d.ts +9 -0
- package/isRangeOrPositionWithinRange.d.ts +1 -0
- package/isRangeWithinRange.d.ts +1 -0
- package/loopEachPositionInRange.d.ts +1 -0
- package/modulatePositionByRange.d.ts +1 -0
- package/modulateRangeBySequenceLength.d.ts +2 -0
- package/normalizePositionByRangeLength.d.ts +1 -0
- package/normalizePositionByRangeLength1Based.d.ts +1 -0
- package/normalizeRange.d.ts +1 -0
- package/package.json +8 -0
- package/provideInclusiveOptions.d.ts +1 -0
- package/reversePositionInRange.d.ts +1 -0
- package/splitRangeIntoTwoPartsIfItIsCircular.d.ts +5 -0
- package/translateRange.d.ts +1 -0
- package/trimNonCicularRangeByAnotherNonCircularRange.d.ts +4 -0
- package/trimNumberToFitWithin0ToAnotherNumber.d.ts +1 -0
- package/trimRangeByAnotherRange.d.ts +15 -0
- package/zeroSubrangeByContainerRange.d.ts +15 -0
package/invertRange.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export default function isPositionCloserToRangeStartThanRangeEnd(position: any, range: any, maxLength: any): boolean;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export default isPositionWithinRange;
|
2
|
+
/**
|
3
|
+
*
|
4
|
+
* @param {*} position //assumed to be a 0 based "caretPosition"
|
5
|
+
* @param {*} range //0 based inclusive range
|
6
|
+
* @param {*} sequenceLength
|
7
|
+
* @param {*} includeEdges - (default false) whether or not to say
|
8
|
+
*/
|
9
|
+
declare function isPositionWithinRange(position: any, range: any, sequenceLength: any, includeStartEdge: any, includeEndEdge: any): boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function isRangeOrPositionWithinRange(rangeOrPositionToCheck: any, containingRange: any, maxLength: any, includeStartEdge: any, includeEndEdge: any): boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function isRangeWithinRange(rangeToCheck: any, containingRange: any, maxLength: any): boolean;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function loopEachPositionInRange(range: any, rangeMax: any, func: any): void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function modulatePositionByRange(position: any, range: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function normalizePositionByRangeLength(pPosition: any, sequenceLength: any, isInBetweenPositions: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function normalizePositionByRangeLength1Based(position: any, sequenceLength: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function normalizeRange(range: any, sequenceLength: any): any;
|
package/package.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export default function provideInclusiveOptions(funToWrap: any): (...args: any[]) => any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function reversePositionInRange(position: any, rangeLength: any, isInBetweenPositions: any): number;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function translateRange(rangeToBeAdjusted: any, translateBy: any, rangeLength: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export default function trimNumberToFitWithin0ToAnotherNumber(numberToBeTrimmed: any, max: any): any;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* trims range, but does *not* adjust it
|
3
|
+
* returns a new range if there is one, or null, if it is trimmed completely
|
4
|
+
* @param {object} subRange {start:
|
5
|
+
* end:
|
6
|
+
* }
|
7
|
+
* @param {object} containerRange {start:
|
8
|
+
* end:
|
9
|
+
* }
|
10
|
+
* @param {int} sequenceLength
|
11
|
+
* @return {object} || null {start:
|
12
|
+
* end:
|
13
|
+
* }
|
14
|
+
*/
|
15
|
+
export default function trimRangeByAnotherRange(rangeToBeTrimmed: any, trimmingRange: any, sequenceLength: int): object;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* "zeroes" a subrange of a container range by
|
3
|
+
* adjusting subRange start and end such that it is as if the container range start = 0.
|
4
|
+
* @param {object} subRange {start:
|
5
|
+
* end:
|
6
|
+
* }
|
7
|
+
* @param {object} containerRange {start:
|
8
|
+
* end:
|
9
|
+
* }
|
10
|
+
* @param {int} sequenceLength
|
11
|
+
* @return {object} {start:
|
12
|
+
* end:
|
13
|
+
* }
|
14
|
+
*/
|
15
|
+
export default function zeroSubrangeByContainerRange(subRange: object, containerRange: object, sequenceLength: int): object;
|