Skip to content

Commit

Permalink
Merge pull request #98 from kolodny/fix-default-export
Browse files Browse the repository at this point in the history
fix($cjs): have a default export
  • Loading branch information
andreiglingeanu committed Mar 3, 2018
2 parents 3f797c9 + c9112f2 commit d9c800c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ var defaultCommands = {
}
};

module.exports = newContext();
var contextForExport = newContext();

module.exports = contextForExport;
module.exports.default = contextForExport;
module.exports.newContext = newContext;

// invariants
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "immutability-helper",
"version": "2.6.5",
"version": "2.6.6",
"description": "mutate a copy of data without changing the original source",
"main": "index.js",
"typings": "index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ var update = require('./');
var expect = require('expect');

describe('update', function() {
describe('default export', function() {
it('should equal update', function() {
expect(update.default).toEqual(update);
});
});

describe('$push', function() {
it('pushes', function() {
Expand Down

0 comments on commit d9c800c

Please sign in to comment.