Skip to content

Commit

Permalink
add 'strictMode' as defined in the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
8HoLoN committed May 3, 2015
1 parent d1b47d1 commit 859d5d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions XIII.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
this.largeNumberNotation = _args.largeNumberNotation || false;
this.forceDoubleBarUse = _args.forceDoubleBarUse || false;
this.forceSideBarsUse = (typeof _args.forceSideBarsUse==='boolean'?_args.forceSideBarsUse:false);
this.strictMode = (typeof _args.strictMode==='boolean'?_args.strictMode:false);

if( (_v+'').match(/^[0-9]+$/) ){
this.o = 0;
Expand All @@ -41,8 +42,6 @@
this.aN = 1;
}

this.strictMode = false;

}

_g.XIII = XIII;
Expand All @@ -56,6 +55,11 @@
};

XIII.prototype.getOppositeNumerals = function() {
if( this.strictMode ){
if( this.a2r(this.aN) !== this.rN ){
return false;
}
}
return this.o?this.aN:this.rN;
};

Expand Down

0 comments on commit 859d5d7

Please sign in to comment.