Skip to content

Commit

Permalink
fix(sanketa): Default inserts changed from behind 👜
Browse files Browse the repository at this point in the history
  • Loading branch information
ideyuta committed Mar 10, 2016
1 parent e341e71 commit 51e50ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -15,7 +15,7 @@ export default function sanketa(rawChars: (number|string), opts: Object = {}): s
let snum = 0;

chars = typeof chars === 'number' ? chars.toString() : chars;
chars = opts.r ? reverse(chars) : chars;
chars = opts.r ? chars : reverse(chars);
chars = Array.from(chars).map((c, key, map) => {
if (key < map.length - 1) {
if (key % digits === 2) {
Expand All @@ -28,7 +28,7 @@ export default function sanketa(rawChars: (number|string), opts: Object = {}): s
}
return c;
}).join('');
return opts.r ? reverse(chars) : chars;
return opts.r ? chars : reverse(chars);
}

/**
Expand Down

0 comments on commit 51e50ea

Please sign in to comment.