Give encode/decode functions more descriptive names

- `encode()`: Renamed to `int_to_base58()`.
- `decode()`: Renamed to `base58_to_int()`.
- Maintain aliases of old function names for backwards compatibility.
This commit is contained in:
2018-11-18 22:17:56 +00:00
parent 35dd6f57a1
commit 8eaae0b86a
3 changed files with 25 additions and 15 deletions

View File

@@ -21,8 +21,8 @@ Flickr short URL is: `http://flic.kr/p/brXijP`
```javascript
const Base58 = require('base58');
Base58.encode(6857269519); // 'brXijP'
Base58.decode('brXijP'); // 6857269519
Base58.int_to_base58(6857269519); // 'brXijP'
Base58.base58_to_int('brXijP'); // 6857269519
```
## Credit