Skip to content

Commit

Permalink
Ensuring versions is immutable by using a Tuple to be set into th…
Browse files Browse the repository at this point in the history
…e `Set`, fixes #6
  • Loading branch information
avoidwork committed May 31, 2015
1 parent 6f32475 commit 47be85e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lib/haro.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright 2015
* @license BSD-3-Clause
* @link https://github.com/avoidwork/haro
* @version 1.0.2
* @version 1.0.3
*/
( function ( global ) {
const Promise = global.Promise || require( "es6-promise" ).Promise;
Expand Down Expand Up @@ -204,7 +204,7 @@ class Haro {
this.registry.push( key );
this.versions.set( key, new Set() );
} else {
this.versions.get( key ).add( clone( this.data.get( key ) ) );
this.versions.get( key ).add( tuple( this.data.get( key ) ) );
}

this.data.set( key, ldata );
Expand Down Expand Up @@ -275,7 +275,7 @@ function factory ( data=null, config={} ) {
return new Haro( data, config );
}

factory.version = "1.0.2";
factory.version = "1.0.3";

// Node, AMD & window supported
if ( typeof exports !== "undefined" ) {
Expand Down
6 changes: 3 additions & 3 deletions lib/haro.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright 2015
* @license BSD-3-Clause
* @link https://github.com/avoidwork/haro
* @version 1.0.2
* @version 1.0.3
*/
"use strict";

Expand Down Expand Up @@ -241,7 +241,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_this3.registry.push(key);
_this3.versions.set(key, new Set());
} else {
_this3.versions.get(key).add(clone(_this3.data.get(key)));
_this3.versions.get(key).add(tuple(_this3.data.get(key)));
}

_this3.data.set(key, ldata);
Expand Down Expand Up @@ -322,7 +322,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return new Haro(data, config);
}

factory.version = "1.0.2";
factory.version = "1.0.3";

// Node, AMD & window supported
if (typeof exports !== "undefined") {
Expand Down
2 changes: 1 addition & 1 deletion lib/haro.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 47be85e

Please sign in to comment.