Skip to content

Commit

Permalink
Exposes structure as property on immstruct.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelbr committed Feb 4, 2015
1 parent 99bda4a commit 9e74b10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Expand Up @@ -17,6 +17,8 @@ module.exports.withHistory = function (key, data) {
});
};

module.exports.Structure = Structure;

function getInstance (options) {
if (typeof options.key === 'object') {
options.data = options.key;
Expand Down
4 changes: 4 additions & 0 deletions tests/immstruct_test.js
Expand Up @@ -15,6 +15,10 @@ describe('immstruct', function () {
immstruct('customKey').should.be.instanceof(EventEmitter);
});

it('should expose Structure', function () {
immstruct.should.have.property('Structure');
});

it('should create empty immutable structure and random key if no input', function () {
var structure = immstruct();
structure.current.toJS().should.be.an('object');
Expand Down

0 comments on commit 9e74b10

Please sign in to comment.