Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

Commit f195b2e

Browse files
committed
feat: remove base1
We've removed it from the multibase spec: * multiformats/multibase#48 * multiformats/multibase#57 License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
1 parent 1ae01a0 commit f195b2e

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ const baseX = require('base-x')
149149
//const newPackage = require('your-package-name')
150150

151151
const constants = [
152-
['base1', '1', '', '1'],
153152
['base2', '0', baseX, '01'],
154153
['base8', '7', baseX, '01234567'],
155154
// ... [ 'your-base-name', 'code-to-be-defined', newPackage, 'alphabet']
@@ -159,7 +158,7 @@ The required package defines the implementation of the encoding/decoding process
159158
- `encode` and `decode` functions with to-be-encoded buffer as the only expected argument
160159
- the require call use the `alphabet` given as an argument for the encoding/decoding process
161160

162-
*If no package is specified (such as for base1 in the above example, it means the base is not implemented yet)*
161+
*If no package is specified, it means the base is not implemented yet*
163162

164163
Adding a new base requires the tests to be updated. Test files to be updated are :
165164
- constants.spec.js

src/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const base64 = require('./base64')
88

99
// name, code, implementation, alphabet
1010
const constants = [
11-
['base1', '1', '', '1'],
1211
['base2', '0', baseX, '01'],
1312
['base8', '7', baseX, '01234567'],
1413
['base10', '9', baseX, '0123456789'],

test/multibase.spec.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ chai.use(dirtyChai)
88
const multibase = require('../src')
99
const constants = require('../src/constants.js')
1010

11-
const unsupportedBases = [
12-
['base1']
13-
]
11+
const unsupportedBases = []
1412

1513
const supportedBases = [
1614
['base2', 'yes mani !', '01111001011001010111001100100000011011010110000101101110011010010010000000100001'],
@@ -96,7 +94,7 @@ describe('multibase', () => {
9694

9795
it('fails on no buf', () => {
9896
expect(() => {
99-
multibase('base1')
97+
multibase('base16')
10098
}).to.throw(Error)
10199
})
102100

0 commit comments

Comments
 (0)