Skip to content

Commit 38904e0

Browse files
committed
chore: rename BytesIter.String to HexString
1 parent 716b1e4 commit 38904e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bytes-iter/bytes-iter.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ describe('BytesIter', () => {
99
})
1010

1111
it('should iterate as String ', () => {
12-
const iter = BytesIter.String('0xdeadbeef')
12+
const iter = BytesIter.HexString('0xdeadbeef')
1313
expect(iter.nextByte()).toEqual('0xde')
1414
expect(iter.nextByte()).toEqual('0xad')
1515
expect(iter.nextBytes(2)).toEqual('0xbeef')
1616
})
1717

1818
it('should iterate in reverse ', () => {
19-
const iter = BytesIter.String('0xdeadbeef')
19+
const iter = BytesIter.HexString('0xdeadbeef')
2020
expect(iter.nextByte(BytesIter.SIDE.Back)).toEqual('0xef')
2121
expect(iter.nextByte(BytesIter.SIDE.Back)).toEqual('0xbe')
2222
expect(iter.nextBytes(2, BytesIter.SIDE.Back)).toEqual('0xdead')

src/bytes-iter/bytes-iter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class BytesIter<T> {
3434
return new BytesIter(bytes, BigInt)
3535
}
3636

37-
static String(bytes: string): BytesIter<string> {
37+
static HexString(bytes: string): BytesIter<string> {
3838
return new BytesIter(bytes, String)
3939
}
4040

0 commit comments

Comments
 (0)