npm install aws-sdk
You can use the method as described below:
// import module
var stringBase = require('string-base');
// Set base string and its length will be treated as base length
stringBase.setBase('abcdef253');
// Now you can convert any Integer to this base by
console.log(stringBase.decimalToBase(258)); //bjg
// Or vice-versa
console.log(stringBase.baseToDecimal('bjg')); //258