Skip to content

Commit 587058d

Browse files
✨ feat: Export default implementation functions.
1 parent 2b0d317 commit 587058d

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

src/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,17 @@ import withoutMethods from './withoutMethods';
55
/* eslint import/no-anonymous-default-export: [2, {"allowObject": true}] */
66
export default withoutMethods;
77

8-
export {DONE_ITERATOR, withMethods, withoutMethods};
8+
const {empty, from, isEmpty, push, peek, pop, iter} = withoutMethods;
9+
10+
export {
11+
DONE_ITERATOR,
12+
withMethods,
13+
withoutMethods,
14+
empty,
15+
from,
16+
isEmpty,
17+
push,
18+
peek,
19+
pop,
20+
iter,
21+
};

test/src/exports.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import test from 'ava';
2+
3+
import {empty, from, isEmpty, push, pop, peek, iter} from '../../src';
4+
5+
test('can import empty', (t) => {
6+
t.true(empty !== undefined);
7+
});
8+
test('can import from', (t) => {
9+
t.true(from !== undefined);
10+
});
11+
test('can import isEmpty', (t) => {
12+
t.true(isEmpty !== undefined);
13+
});
14+
test('can import push', (t) => {
15+
t.true(push !== undefined);
16+
});
17+
test('can import pop', (t) => {
18+
t.true(pop !== undefined);
19+
});
20+
test('can import peek', (t) => {
21+
t.true(peek !== undefined);
22+
});
23+
test('can import iter', (t) => {
24+
t.true(iter !== undefined);
25+
});

0 commit comments

Comments
 (0)