WIP - add extractor, generate snippet_data
This commit is contained in:
9
node_modules/underscore.string/helper/adjacent.js
generated
vendored
Normal file
9
node_modules/underscore.string/helper/adjacent.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user