@@ -25,7 +25,7 @@ Compare two `Uint8Arrays`
2525#### Example
2626
2727``` js
28- const compare = require ( ' uint8arrays/compare' )
28+ import { compare } from ' uint8arrays/compare'
2929
3030const arrays = [
3131 Uint8Array .from ([3 , 4 , 5 ]),
@@ -50,7 +50,7 @@ If you know the length of the arrays, pass it as a second parameter, otherwise i
5050#### Example
5151
5252``` js
53- const concat = require ( ' uint8arrays/concat' )
53+ import { concat } from ' uint8arrays/concat'
5454
5555const arrays = [
5656 Uint8Array .from ([0 , 1 , 2 ]),
@@ -70,7 +70,7 @@ Returns true if the two arrays are the same array or if they have the same lengt
7070#### Example
7171
7272``` js
73- const equals = require ( ' uint8arrays/equals' )
73+ import { equals } from ' uint8arrays/equals'
7474
7575const a = Uint8Array .from ([0 , 1 , 2 ])
7676const b = Uint8Array .from ([3 , 4 , 5 ])
@@ -90,7 +90,7 @@ Supports `utf8` and any of the [multibase encodings](https://github.com/multifor
9090#### Example
9191
9292``` js
93- const fromString = require ( ' uint8arrays/from-string' )
93+ import { fromString } from ' uint8arrays/from-string'
9494
9595console .info (fromString (' hello world' )) // Uint8Array[104, 101 ...
9696console .info (fromString (' 00010203aabbcc' , ' base16' )) // Uint8Array[0, 1 ...
@@ -107,7 +107,7 @@ Supports `utf8` and any of the [multibase encodings](https://github.com/multifor
107107#### Example
108108
109109``` js
110- const toString = require ( ' uint8arrays/to-string' )
110+ import { toString } from ' uint8arrays/to-string'
111111
112112console .info (toString (Uint8Array .from ([104 , 101. ..]))) // 'hello world'
113113console .info (toString (Uint8Array .from ([0 , 1 , 2. ..]), ' base16' )) // '00010203aabbcc'
@@ -122,7 +122,7 @@ Returns a `Uint8Array` containing `a` and `b` xored together.
122122#### Example
123123
124124``` js
125- const xor = require ( ' uint8arrays/xor' )
125+ import { xor } from ' uint8arrays/xor'
126126
127127console .info (xor (Uint8Array .from ([1 , 0 ]), Uint8Array .from ([0 , 1 ]))) // Uint8Array[1, 1]
128128```
0 commit comments