Skip to content

Commit

Permalink
Export the Duration class with Handy
Browse files Browse the repository at this point in the history
  • Loading branch information
negativetwelve committed Sep 2, 2017
1 parent f8f7bc0 commit 465d562
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/handy-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
],
"dependencies": {
"handy-datetime": "^1.1.1",
"handy-duration": "^1.2.0",
"handy-filesize": "^1.1.1"
},
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions packages/handy-js/src/Handy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Handy
import Datetime from 'handy-datetime';
import Duration from 'handy-duration';
import Filesize from 'handy-filesize';


// Export as module.exports so we can import the entire object at once in
// ES6 environments but still allows destructuring.
module.exports = {
Datetime,
Duration,
Filesize,
};
6 changes: 6 additions & 0 deletions packages/handy-js/src/__tests__/Handy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ describe('Handy', () => {
});
});

describe('Duration', () => {
it('should exist', () => {
expect(Handy.Duration).toBeDefined();
});
});

describe('Filesize', () => {
it('should exist', () => {
expect(Handy.Filesize).toBeDefined();
Expand Down

0 comments on commit 465d562

Please sign in to comment.