JavaScript implementation of the opposite of Ruby's succ/next string functions
npm install string-predGet 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 pred() method!
`js
require('string-pred')
console.log('abce'.pred()) // 'abcd'
console.log('THX1139'.pred()) // 'THX1138'
console.log('<
console.log('2000aaa'.pred()) // '1999zzz'
console.log('AAAA0000'.pred()) // 'ZZZ9999'
``
There is an implementation of next/succ Ruby's function in JavaScript, of which this module could be considered the complementary function:
https://gist.github.com/devongovett/1081265
WTFPL