Skip to content

Commit 99f4d54

Browse files
authored
Revision 0.11.6 (#17)
* Rename TakeLeft to ShiftLeft * Version
1 parent a2b03fd commit 99f4d54

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/token/internal/guard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ export function IsString(value: unknown): value is string {
3838
export function IsEqual(left: unknown, right: unknown): boolean {
3939
return left === right
4040
}
41-
export function TakeLeft<T, True extends (left: T, right: T[]) => unknown, False extends () => unknown>(array: T[], true_: True, false_: False): ReturnType<True> | ReturnType<False> {
41+
export function ShiftLeft<T, True extends (left: T, right: T[]) => unknown, False extends () => unknown>(array: T[], true_: True, false_: False): ReturnType<True> | ReturnType<False> {
4242
return (IsEqual(array.length, 0) ? false_() : true_(array[0], array.slice(1))) as never
4343
}

src/token/internal/take.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function Take<Variants extends string[], Input extends string>(variants:
6262
// ----------------------------------------------------------------
6363
// Symmetric
6464
// ----------------------------------------------------------------
65-
// return Guard.TakeLeft(variants, (valueLeft, valueRight) =>
65+
// return Guard.ShiftLeft(variants, (valueLeft, valueRight) =>
6666
// Match(TakeVariant(valueLeft, input), (take, rest) =>
6767
// [take, rest],
6868
// () => Take(valueRight, input)),

src/token/until.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ THE SOFTWARE.
3030
// deno-fmt-ignore-file
3131

3232
import { Match } from './internal/match.ts'
33-
import { IsEqual, TakeLeft } from './internal/guard.ts'
33+
import { IsEqual, ShiftLeft } from './internal/guard.ts'
3434

3535
// ------------------------------------------------------------------
3636
// TakeOne
@@ -55,7 +55,7 @@ type TIsInputMatchSentinal<End extends string[], Input extends string> = (
5555
: false
5656
)
5757
function IsInputMatchSentinal<End extends string[], Input extends string>(end: [...End], input: Input): TIsInputMatchSentinal<End, Input> {
58-
return TakeLeft(end, (left, right) =>
58+
return ShiftLeft(end, (left, right) =>
5959
input.startsWith(left)
6060
? true
6161
: IsInputMatchSentinal(right, input),

tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Task } from 'tasksmith'
22

3-
const VERSION = '0.11.5'
3+
const VERSION = '0.11.6'
44

55
// ------------------------------------------------------------------
66
// Clean

0 commit comments

Comments
 (0)