Get the predecessor of a given string. It is calculated decrementing each character in the string starting from the rightmost position. Decrementing a digit will result in another digit and decrementing a letter will result in another letter of the same case. Other characters or symbols are not modified.
npm install string-pred
Just require the module and strings will have a new
console // 'abcd'console // 'THX1138'console // '<<koala>>'console // '1999zzz'console // 'ZZZ9999'