Skip to content

Commit 0e98eb7

Browse files
♻️ refactor: Use arrow functions.
1 parent aaacb9e commit 0e98eb7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/_next.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
* @param {Iterator} iterator - The input iterator.
55
* @returns {{value: any, done?: boolean}}
66
*/
7-
export default function _next(iterator) {
8-
return iterator.next();
9-
}
7+
const _next = (iterator) => iterator.next();
8+
export default _next;

src/next.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import _next from './_next.js';
1111
* that the input iterator is exhausted.
1212
* @returns {any} The next value of the input iterator.
1313
*/
14-
export default function next(iterator, dflt = undefined) {
14+
const next = (iterator, dflt = undefined) => {
1515
const x = _next(iterator);
1616

1717
if (x.done) {
@@ -23,4 +23,6 @@ export default function next(iterator, dflt = undefined) {
2323
}
2424

2525
return x.value;
26-
}
26+
};
27+
28+
export default next;

0 commit comments

Comments
 (0)