Skip to content

Commit 6b5321a

Browse files
😒 chore(lint): Run xo --fix.
1 parent 110add9 commit 6b5321a

20 files changed

+40
-40
lines changed

src/fromAsyncIterable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import fromIterator from './fromIterator';
77
* @param {AsyncIterable} _iterable - The iterable to convert.
88
* @returns {Tape} The converted tape.
99
*/
10-
export default _iterable => fromIterator(_iterable[Symbol.asyncIterator]());
10+
export default (_iterable) => fromIterator(_iterable[Symbol.asyncIterator]());

src/fromCallable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import Tape from './Tape';
77
* @param {Callable} callable - The callable to convert.
88
* @returns {Tape} The converted tape.
99
*/
10-
export default callable => new Tape(callable);
10+
export default (callable) => new Tape(callable);

src/fromIterable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import fromIterator from './fromIterator';
77
* @param {Iterable} iterable - The iterable to convert.
88
* @returns {Tape} The converted tape.
99
*/
10-
export default iterable => fromIterator(iterable[Symbol.iterator]());
10+
export default (iterable) => fromIterator(iterable[Symbol.iterator]());

src/fromIterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import fromCallable from './fromCallable';
77
* @param {Iterator} iterator - The iterator to convert.
88
* @returns {Tape} The converted tape.
99
*/
10-
export default iterator => fromCallable(iterator.next.bind(iterator));
10+
export default (iterator) => fromCallable(iterator.next.bind(iterator));

src/fromReadStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ export async function* _fromReadStream(readStream) {
2020
* @param {ReadStream} readStream - The ReadStream object to convert.
2121
* @returns {Tape} The converted tape.
2222
*/
23-
export default readStream => fromAsyncIterable(_fromReadStream(readStream));
23+
export default (readStream) => fromAsyncIterable(_fromReadStream(readStream));

src/split.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function* _split(tape, sep) {
3232
if (_sep.has(token)) continue;
3333

3434
const group = fromAsyncIterable(
35-
(async function*() {
35+
(async function* () {
3636
yield token;
3737

3838
while (true) {

src/toArray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ import asyncIterableToArray from './asyncIterableToArray';
88
* @param {Tape} tape - The tape to read from.
99
* @returns {Array} The converted array.
1010
*/
11-
export default tape => asyncIterableToArray(toAsyncIterable(tape));
11+
export default (tape) => asyncIterableToArray(toAsyncIterable(tape));

src/toAsyncCallable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import toAsyncIterator from './toAsyncIterator';
77
* @param {Tape} tape - The tape to read from.
88
* @return {Callable} The converted callable.
99
*/
10-
export default tape => {
10+
export default (tape) => {
1111
const it = toAsyncIterator(tape);
1212
return it.next.bind(it);
1313
};

src/toAsyncIterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import toAsyncIterable from './toAsyncIterable';
77
* @param {Tape} tape - The tape to read from.
88
* @returns {AsyncIterator} The converted iterator.
99
*/
10-
export default tape => toAsyncIterable(tape)[Symbol.asyncIterator]();
10+
export default (tape) => toAsyncIterable(tape)[Symbol.asyncIterator]();

src/toString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ import toArray from './toArray';
77
* @param {Tape} tape - The tape to read from.
88
* @returns {String} The converted string.
99
*/
10-
export default async tape => (await toArray(tape)).join('');
10+
export default async (tape) => (await toArray(tape)).join('');

test/src/asyncIterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fromString from '../../src/fromString';
55
/**
66
* @test {Tape#[Symbol.asyncIterator]}
77
*/
8-
test('Can iterate on a Tape object', async t => {
8+
test('Can iterate on a Tape object', async (t) => {
99
const input = 'abcd';
1010
t.plan(input.length + 1);
1111

test/src/fromReadStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import test from 'ava';
44
import fromReadStream from '../../src/fromReadStream';
55
import toString from '../../src/toString';
66

7-
test('unread token', async t => {
7+
test('unread token', async (t) => {
88
const filepath = 'test/data/hello-world.txt';
99
const encoding = 'utf8';
1010
const expected = fs.readFileSync(filepath, encoding);

test/src/ignore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {fromString, ignore, toString} from '../../src';
55
/**
66
* @test {ignore}
77
*/
8-
test('can ignore tokens from tape', async t => {
8+
test('can ignore tokens from tape', async (t) => {
99
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1010
let myTape = fromString(input);
1111
myTape = ignore(myTape, ' \t\n');
@@ -15,7 +15,7 @@ test('can ignore tokens from tape', async t => {
1515
/**
1616
* @test {ignore}
1717
*/
18-
test('can ignore tokens from tape (bis)', async t => {
18+
test('can ignore tokens from tape (bis)', async (t) => {
1919
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5';
2020
let myTape = fromString(input);
2121
myTape = ignore(myTape, ' \t\n');

test/src/map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import toString from '../../src/toString';
77
/**
88
* @test {map}
99
*/
10-
test('can use map', async t => {
10+
test('can use map', async (t) => {
1111
const input = 'ababbaab';
1212
const myTape1 = fromString(input);
13-
const myTape2 = map(x => (x === 'a' ? 0 : 1), myTape1);
13+
const myTape2 = map((x) => (x === 'a' ? 0 : 1), myTape1);
1414
const expected = input.replace(/a/g, '0').replace(/b/g, '1');
1515
t.deepEqual(await toString(myTape2), expected);
1616
});

test/src/promise.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,53 @@ import fromString from '../../src/fromString';
1010
* @test {Tape#skipMany}
1111
*/
1212
// eslint-disable-next-line ava/prefer-async-await
13-
test('As a promise', t => {
13+
test('As a promise', (t) => {
1414
const myTape = fromString('abracadabra');
1515

1616
return myTape
1717
.read()
18-
.then(c => t.is(c, 'a'))
18+
.then((c) => t.is(c, 'a'))
1919
.then(() => myTape.read())
20-
.then(c => t.is(c, 'b'))
20+
.then((c) => t.is(c, 'b'))
2121
.then(() => myTape.unread('Z'))
2222
.then(() => myTape.unread('X'))
2323
.then(() => myTape.read())
24-
.then(c => t.is(c, 'X'))
24+
.then((c) => t.is(c, 'X'))
2525
.then(() => myTape.read())
26-
.then(c => t.is(c, 'Z'))
26+
.then((c) => t.is(c, 'Z'))
2727
.then(() => myTape.skipMany(0))
2828
.then(() => myTape.read())
29-
.then(c => t.is(c, 'r'))
29+
.then((c) => t.is(c, 'r'))
3030
.then(() => myTape.read())
31-
.then(c => t.is(c, 'a'))
31+
.then((c) => t.is(c, 'a'))
3232
.then(() => myTape.skipMany(2))
3333
.then(() => myTape.read())
34-
.then(c => t.is(c, 'd'))
34+
.then((c) => t.is(c, 'd'))
3535
.then(() => myTape.skip())
3636
.then(() => myTape.read())
37-
.then(c => t.is(c, 'b'))
37+
.then((c) => t.is(c, 'b'))
3838
.then(() => myTape.read())
39-
.then(c => t.is(c, 'r'))
39+
.then((c) => t.is(c, 'r'))
4040
.then(() => myTape.read())
41-
.then(c => t.is(c, 'a'))
41+
.then((c) => t.is(c, 'a'))
4242
.then(() => myTape.read())
43-
.then(c => t.is(c, myTape.eof))
43+
.then((c) => t.is(c, myTape.eof))
4444
.then(() => myTape.read())
45-
.then(c => t.is(c, myTape.eof))
45+
.then((c) => t.is(c, myTape.eof))
4646
.then(() => myTape.read())
47-
.then(c => t.is(c, myTape.eof))
47+
.then((c) => t.is(c, myTape.eof))
4848
.then(() => myTape.unread('X'))
4949
.then(() => myTape.unread('Y'))
5050
.then(() => myTape.read())
51-
.then(c => t.is(c, 'Y'))
51+
.then((c) => t.is(c, 'Y'))
5252
.then(() => myTape.unread('%'))
5353
.then(() => myTape.skip())
5454
.then(() => myTape.read())
55-
.then(c => t.is(c, 'X'))
55+
.then((c) => t.is(c, 'X'))
5656
.then(() => myTape.read())
57-
.then(c => t.is(c, myTape.eof))
57+
.then((c) => t.is(c, myTape.eof))
5858
.then(() => myTape.read())
59-
.then(c => t.is(c, myTape.eof))
59+
.then((c) => t.is(c, myTape.eof))
6060
.then(() => myTape.read())
61-
.then(c => t.is(c, myTape.eof));
61+
.then((c) => t.is(c, myTape.eof));
6262
});

test/src/skip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {fromString, skip} from '../../src';
66
* @test {fromString}
77
* @test {skip}
88
*/
9-
test('can skip tokens from tape', async t => {
9+
test('can skip tokens from tape', async (t) => {
1010
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1111
const tape = fromString(input);
1212
t.is(await skip(tape, ' \t\n'), '1');

test/src/split.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {fromString, split, toString} from '../../src';
55
/**
66
* @test {split}
77
*/
8-
test('can split tape', async t => {
8+
test('can split tape', async (t) => {
99
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1010
let myTape = fromString(input);
1111
myTape = split(myTape, ' \t\n');

test/src/string.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import toString from '../../src/toString';
77
* @test {fromString}
88
* @test {toString}
99
*/
10-
test('can read from string', async t => {
10+
test('can read from string', async (t) => {
1111
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1212
const myTape = fromString(input);
1313
t.deepEqual(await toString(myTape), input);

test/src/toAsyncCallable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {fromString, toAsyncCallable, fromCallable, toString} from '../../src';
55
/**
66
* @test {toAsyncCallable}
77
*/
8-
test('toAsyncCallable', async t => {
8+
test('toAsyncCallable', async (t) => {
99
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1010
const myTape1 = fromString(input);
1111
const mycallable = toAsyncCallable(myTape1);

test/src/unread.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {fromString, toAsyncCallable, fromCallable, toString} from '../../src';
55
/**
66
* @test {Tape#unread}
77
*/
8-
test('unread token', async t => {
8+
test('unread token', async (t) => {
99
const input = '\n\n\n 1 ,\t22\n, 333\t,\n-44 ,\t-5 \t\n \t';
1010
const myTape1 = fromString(input);
1111
const mycallable = toAsyncCallable(myTape1);

0 commit comments

Comments
 (0)