This repository was archived by the owner on Aug 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: more encoding, errors, spec tests #55
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ec08b0a
feat: more encoding, errors, spec tests
hugomrdias c8f7629
chore: linter
hugomrdias 2f88cb3
fix: improve pad detection
hugomrdias da6c03f
fix: remove unnecessary &
hugomrdias 61af347
fix: feedback
hugomrdias 6290e54
fix: remove unnecessary comments
hugomrdias 3a60dca
fix: use \x00 instead of \u0000
hugomrdias ece18c8
fix: more of the same
hugomrdias 6af467f
fix: Make all encodings case-insensitive expect the ones that include…
hugomrdias 1fc49d6
fix: feedback
hugomrdias 146dfb7
chore: remove commit lint
hugomrdias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* eslint-disable no-console */ | ||
| 'use strict' | ||
| const Benchmark = require('benchmark') | ||
| const multibase = require('./src') | ||
|
|
||
| const names = Object.keys(multibase.names) | ||
| const suite = new Benchmark.Suite() | ||
| const input = 'Decentralize everything!!' | ||
|
|
||
| for (const enc of names) { | ||
| suite.add(enc, () => { | ||
| multibase.encode(enc, Buffer.from(input)) | ||
| }) | ||
| } | ||
|
|
||
| suite | ||
| .on('cycle', function (event) { | ||
| console.log(String(event.target)) | ||
| }) | ||
| .on('complete', function () { | ||
| console.log('Fastest is ' + this.filter('fastest').map('name')) | ||
| }) | ||
| .run({ async: true }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.