Skip to content

Commit

Permalink
🤖 chore: Use ESM import syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Mar 12, 2021
1 parent 634de81 commit 82e8e12
Show file tree
Hide file tree
Showing 88 changed files with 557 additions and 856 deletions.
4 changes: 2 additions & 2 deletions src/base/by.js
@@ -1,5 +1,5 @@
import {iter} from './iter';
import {range} from './range';
import {iter} from './iter.js';
import {range} from './range.js';

/**
* Yields elements of the input iterable by grouping them into tuples of a
Expand Down
2 changes: 1 addition & 1 deletion src/base/count.js
@@ -1,4 +1,4 @@
import {_count} from './_count';
import {_count} from './_count.js';

/**
* Yields increasing or decreasing sequences of numbers. The starting value
Expand Down
6 changes: 3 additions & 3 deletions src/base/drop.js
@@ -1,6 +1,6 @@
import {iter} from './iter';
import {consume} from './consume';
import {tail} from './tail';
import {iter} from './iter.js';
import {consume} from './consume.js';
import {tail} from './tail.js';

/**
* Drops the first <code>n</code> values of the input iterable.
Expand Down
2 changes: 1 addition & 1 deletion src/base/first.js
@@ -1,4 +1,4 @@
import {next} from './next';
import {next} from './next.js';

/**
* Same as {@link next}.
Expand Down
4 changes: 2 additions & 2 deletions src/base/frame.js
@@ -1,5 +1,5 @@
import {iter} from './iter';
import {range} from './range';
import {iter} from './iter.js';
import {range} from './range.js';

/**
* Yields tuples that contain the current element of the input iterable and the
Expand Down
2 changes: 1 addition & 1 deletion src/base/head.js
@@ -1,4 +1,4 @@
import {take} from './take';
import {take} from './take.js';

/**
* Same as {@link take}.
Expand Down
50 changes: 25 additions & 25 deletions src/base/index.js
@@ -1,25 +1,25 @@
export * from './StopIteration';
export * from './_count';
export * from './_next';
export * from './_range';
export * from './by';
export * from './consume';
export * from './count';
export * from './cycle';
export * from './drop';
export * from './exhaust';
export * from './first';
export * from './frame';
export * from './head';
export * from './iter';
export * from './len';
export * from './last';
export * from './list';
export * from './ncycle';
export * from './next';
export * from './pick';
export * from './range';
export * from './tail';
export * from './take';
export * from './tee';
export * from './trunc';
export * from './StopIteration.js';
export * from './_count.js';
export * from './_next.js';
export * from './_range.js';
export * from './by.js';
export * from './consume.js';
export * from './count.js';
export * from './cycle.js';
export * from './drop.js';
export * from './exhaust.js';
export * from './first.js';
export * from './frame.js';
export * from './head.js';
export * from './iter.js';
export * from './last.js';
export * from './len.js';
export * from './list.js';
export * from './ncycle.js';
export * from './next.js';
export * from './pick.js';
export * from './range.js';
export * from './tail.js';
export * from './take.js';
export * from './tee.js';
export * from './trunc.js';
4 changes: 2 additions & 2 deletions src/base/last.js
@@ -1,5 +1,5 @@
import {next} from './next';
import {tail} from './tail';
import {next} from './next.js';
import {tail} from './tail.js';

/**
* Returns the last value of the input iterable. If the iterable is
Expand Down
2 changes: 1 addition & 1 deletion src/base/next.js
@@ -1,4 +1,4 @@
import {StopIteration} from './StopIteration';
import {StopIteration} from './StopIteration.js';

/**
* Returns the next value of the input iterator. If the iterator is exhausted,
Expand Down
2 changes: 1 addition & 1 deletion src/base/range.js
@@ -1,4 +1,4 @@
import {_range} from './_range';
import {_range} from './_range.js';

/**
* Yields values in a range, separated by a fixed constant called step. If this
Expand Down
2 changes: 1 addition & 1 deletion src/base/tail.js
@@ -1,6 +1,6 @@
import deque from '@aureooms/js-collections-deque';

import {drop} from './drop';
import {drop} from './drop.js';

/**
* Returns the last <code>n</code> values of the input iterable in an array.
Expand Down
4 changes: 2 additions & 2 deletions src/base/take.js
@@ -1,5 +1,5 @@
import {iter} from './iter';
import {trunc} from './trunc';
import {iter} from './iter.js';
import {trunc} from './trunc.js';

/**
* Yields the first <code>n</code> elements of the input iterable. If
Expand Down
6 changes: 3 additions & 3 deletions src/base/tee.js
@@ -1,6 +1,6 @@
import {iter} from './iter';
import {list} from './list';
import {map} from '../map/map';
import {iter} from './iter.js';
import {list} from './list.js';
import {map} from '../map/map.js';

import deque from '@aureooms/js-collections-deque';

Expand Down
4 changes: 2 additions & 2 deletions src/base/trunc.js
@@ -1,7 +1,7 @@
import deque from '@aureooms/js-collections-deque';

import {iter} from './iter';
import {take} from './take';
import {iter} from './iter.js';
import {take} from './take.js';

/**
* Yields all elements of the iterable except the last <code>n</code> ones. If
Expand Down
2 changes: 1 addition & 1 deletion src/extra/diagonal.js
@@ -1,6 +1,6 @@
import deque from '@aureooms/js-collections-deque';

import {iter, _next, count} from '../base';
import {iter, _next, count} from '../base/index.js';

/**
* Computes the product of two iterables in a way that allows for one or both
Expand Down
6 changes: 3 additions & 3 deletions src/extra/index.js
@@ -1,3 +1,3 @@
export * from './closure';
export * from './diagonal';
export * from './nth';
export * from './closure.js';
export * from './diagonal.js';
export * from './nth.js';
2 changes: 1 addition & 1 deletion src/extra/nth.js
@@ -1,5 +1,5 @@
import deque from '@aureooms/js-collections-deque';
import {next, drop, StopIteration} from '../base';
import {next, drop, StopIteration} from '../base/index.js';

/**
* Returns the <code>n</code>th value of the input iterable (<code>n</code>
Expand Down
8 changes: 4 additions & 4 deletions src/index.js
@@ -1,4 +1,4 @@
export * from './base';
export * from './extra';
export * from './map';
export * from './reduce';
export * from './base/index.js';
export * from './extra/index.js';
export * from './map/index.js';
export * from './reduce/index.js';
2 changes: 1 addition & 1 deletion src/map/_zip.js
@@ -1,4 +1,4 @@
import {list, map, iter, _next} from '..';
import {list, map, iter, _next} from '../index.js';

/**
* Zips iterables together. Yields a tuple containing the first element of each
Expand Down
2 changes: 1 addition & 1 deletion src/map/_zip2.js
@@ -1,4 +1,4 @@
import {iter} from '..';
import {iter} from '../index.js';

/**
* Zips exactly two iterables together. Yields a tuple containing the first
Expand Down
2 changes: 1 addition & 1 deletion src/map/_ziplongest.js
@@ -1,4 +1,4 @@
import {list, map, iter, _next, repeat, enumerate} from '..';
import {list, map, iter, _next, repeat, enumerate} from '../index.js';

/**
* Same as _zip, but continues to yield zipped tuples until the last iterable is
Expand Down
2 changes: 1 addition & 1 deletion src/map/combinations.js
@@ -1,4 +1,4 @@
import {list, range, pick} from '..';
import {list, range, pick} from '../index.js';

/**
* Yields all combinations of each possible choice of <code>r</code> elements
Expand Down
2 changes: 1 addition & 1 deletion src/map/combinationswithrepetition.js
@@ -1,4 +1,4 @@
import {list, nrepeat, pick} from '..';
import {list, nrepeat, pick} from '../index.js';

/**
* Yields all combinations, with repetitions, of each possible choice of
Expand Down
2 changes: 1 addition & 1 deletion src/map/compress.js
@@ -1,4 +1,4 @@
import {_zip2} from '..';
import {_zip2} from '../index.js';

/**
* Filters the first input iterable according to truthy and flasy values from a
Expand Down
2 changes: 1 addition & 1 deletion src/map/dropwhile.js
@@ -1,4 +1,4 @@
import {iter} from '..';
import {iter} from '../index.js';

/**
* Drop elements of the input iterable while the current element satisfies the
Expand Down
2 changes: 1 addition & 1 deletion src/map/enumerate.js
@@ -1,4 +1,4 @@
import {_zip2, _count} from '..';
import {_zip2, _count} from '../index.js';

/**
* Yields (index,element) tuples where the elements are taken from the input
Expand Down
2 changes: 1 addition & 1 deletion src/map/group.js
@@ -1,4 +1,4 @@
import {iter} from '..';
import {iter} from '../index.js';

/**
* Yields elements of the input iterable by grouping them into tuples
Expand Down
52 changes: 26 additions & 26 deletions src/map/index.js
@@ -1,26 +1,26 @@
export * from './_product';
export * from './_zip';
export * from './_zip2';
export * from './_ziplongest';
export * from './chain';
export * from './combinations';
export * from './combinationswithrepetition';
export * from './compress';
export * from './dropwhile';
export * from './enumerate';
export * from './filter';
export * from './filterfalse';
export * from './group';
export * from './map';
export * from './nrepeat';
export * from './permutations';
export * from './product';
export * from './repeat';
export * from './reversed';
export * from './roundrobin';
export * from './slice';
export * from './sorted';
export * from './starmap';
export * from './takewhile';
export * from './zip';
export * from './ziplongest';
export * from './_product.js';
export * from './_zip.js';
export * from './_zip2.js';
export * from './_ziplongest.js';
export * from './chain.js';
export * from './combinations.js';
export * from './combinationswithrepetition.js';
export * from './compress.js';
export * from './dropwhile.js';
export * from './enumerate.js';
export * from './filter.js';
export * from './filterfalse.js';
export * from './group.js';
export * from './map.js';
export * from './nrepeat.js';
export * from './permutations.js';
export * from './product.js';
export * from './repeat.js';
export * from './reversed.js';
export * from './roundrobin.js';
export * from './slice.js';
export * from './sorted.js';
export * from './starmap.js';
export * from './takewhile.js';
export * from './zip.js';
export * from './ziplongest.js';
2 changes: 1 addition & 1 deletion src/map/permutations.js
@@ -1,4 +1,4 @@
import {list, range, head, pick} from '..';
import {list, range, head, pick} from '../index.js';

/**
* Yields all permutations of each possible choice of <code>r</code> elements
Expand Down
2 changes: 1 addition & 1 deletion src/map/product.js
@@ -1,4 +1,4 @@
import {list, map, _product, ncycle, reversed} from '..';
import {list, map, _product, ncycle, reversed} from '../index.js';

/**
* Computes the product of the iterables given as first parameter. The second
Expand Down
2 changes: 1 addition & 1 deletion src/map/roundrobin.js
@@ -1,4 +1,4 @@
import {iter, len, cycle, map, slice} from '..';
import {iter, len, cycle, map, slice} from '../index.js';

/**
* Yields the first item of the first input iterable, then the first item of
Expand Down
2 changes: 1 addition & 1 deletion src/map/slice.js
@@ -1,4 +1,4 @@
import {iter} from '..';
import {iter} from '../index.js';

/**
* Same as
Expand Down
2 changes: 1 addition & 1 deletion src/map/sorted.js
@@ -1,4 +1,4 @@
import {list} from '../base/list';
import {list} from '../base/list.js';

/**
* Outputs an array containing the elements of the input iterable sorted
Expand Down
2 changes: 1 addition & 1 deletion src/map/zip.js
@@ -1,4 +1,4 @@
import {_zip} from './_zip';
import {_zip} from './_zip.js';

/**
* Zips iterables together. Yields a tuple containing the first element of each
Expand Down
2 changes: 1 addition & 1 deletion src/map/ziplongest.js
@@ -1,4 +1,4 @@
import {_ziplongest} from './_ziplongest';
import {_ziplongest} from './_ziplongest.js';

/**
* Same as zip, but continues to yield zipped tuples until the last iterable is
Expand Down
18 changes: 9 additions & 9 deletions src/reduce/index.js
@@ -1,9 +1,9 @@
export * from './_reduce';
export * from './_sum';
export * from './all';
export * from './any';
export * from './max';
export * from './min';
export * from './reduce';
export * from './some';
export * from './sum';
export * from './_reduce.js';
export * from './_sum.js';
export * from './all.js';
export * from './any.js';
export * from './max.js';
export * from './min.js';
export * from './reduce.js';
export * from './some.js';
export * from './sum.js';
2 changes: 1 addition & 1 deletion src/reduce/max.js
@@ -1,4 +1,4 @@
import {iter} from '../base/iter';
import {iter} from '../base/iter.js';

/**
* Returns the largest element of the input iterable according
Expand Down
2 changes: 1 addition & 1 deletion src/reduce/min.js
@@ -1,4 +1,4 @@
import {iter} from '../base/iter';
import {iter} from '../base/iter.js';

/**
* Returns the smallest element of the input iterable according
Expand Down
4 changes: 2 additions & 2 deletions src/reduce/reduce.js
@@ -1,5 +1,5 @@
import {_reduce} from './_reduce';
import {iter} from '../base/iter';
import {_reduce} from './_reduce.js';
import {iter} from '../base/iter.js';

/**
* Applies the accumulator function iteratively on the last return value of the
Expand Down
2 changes: 1 addition & 1 deletion src/reduce/sum.js
@@ -1,4 +1,4 @@
import {_sum} from './_sum';
import {_sum} from './_sum.js';

/**
* Sums the elements of the input iterable. An optional initializer parameter
Expand Down
2 changes: 1 addition & 1 deletion test/src/base/by.js
@@ -1,6 +1,6 @@
import test from 'ava';

import {range, by, zip, list, count, head} from '../../../src';
import {range, by, zip, list, count, head} from '../../../src/index.js';

test('by', (t) => {
const A = by(range(100), 2);
Expand Down
2 changes: 1 addition & 1 deletion test/src/base/consume.js
@@ -1,6 +1,6 @@
import test from 'ava';

import {range, consume, list} from '../../../src';
import {range, consume, list} from '../../../src/index.js';

test('consume', (t) => {
const iterator = range(100);
Expand Down
2 changes: 1 addition & 1 deletion test/src/base/count.js
@@ -1,6 +1,6 @@
import test from 'ava';

import {count, next} from '../../../src';
import {count, next} from '../../../src/index.js';

test('count( 0 , 1 )', (t) => {
const it = count(0, 1);
Expand Down

0 comments on commit 82e8e12

Please sign in to comment.