Skip to content

Commit

Permalink
chore: fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Mar 7, 2024
1 parent cf396f2 commit f18170d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/from-string.node.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { asUint8Array } from '#util/as-uint8array'
import bases, { type SupportedEncodings } from './util/bases.js'
import { asUint8Array } from '#util/as-uint8array'

export type { SupportedEncodings }

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@
* ```
*/

import { equals } from './equals.js'
import { xor } from './xor.js'
import { compare } from '#compare'
import { concat } from '#concat'
import { equals } from './equals.js'
import { fromString } from '#from-string'
import { toString } from '#to-string'
import { xor } from './xor.js'

export {
compare,
Expand Down
1 change: 0 additions & 1 deletion src/to-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export function toString (array: Uint8Array, encoding: SupportedEncodings = 'utf
throw new Error(`Unsupported encoding "${encoding}"`)
}


// strip multibase prefix
return base.encoder.encode(array).substring(1)
}
2 changes: 1 addition & 1 deletion src/util/bases.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { bases } from 'multiformats/basics'
import { allocUnsafe } from '#alloc'
import type { MultibaseCodec } from 'multiformats'
import { allocUnsafe } from '#alloc'

function createCodec (name: string, prefix: string, encode: (buf: Uint8Array) => string, decode: (str: string) => Uint8Array): MultibaseCodec<any> {
return {
Expand Down
2 changes: 1 addition & 1 deletion test/from-string.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import bases from '../src/util/bases.js'
import { fromString, type SupportedEncodings } from '#from-string'
import { toString } from '#to-string'
import bases from '../src/util/bases.js'

const supportedBases = Object.keys(bases) as SupportedEncodings[]

Expand Down

0 comments on commit f18170d

Please sign in to comment.