Code coverage report for master/helper/adjacent.js

Statements: 100% (6 / 6)      Branches: 100% (2 / 2)      Functions: 100% (1 / 1)      Lines: 100% (6 / 6)      Ignored: none     

All files » master/helper/ » adjacent.js
1 2 3 4 5 6 7 8 9 101   1 24 24 16   8    
var makeString = require('./makeString');
 
module.exports = function adjacent(str, direction) {
  str = makeString(str);
  if (str.length === 0) {
    return '';
  }
  return str.slice(0, -1) + String.fromCharCode(str.charCodeAt(str.length - 1) + direction);
};