Skip to content

Commit e1f42a3

Browse files
authored
fix: restore node: prefix (#889)
1 parent c7ee405 commit e1f42a3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README_js.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```javascript --hide
2-
import crypto from 'crypto';
2+
import crypto from 'node:crypto';
33

44
runmd.onRequire = (path) => {
55
if (path == 'rng') return fun;

src/md5.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createHash } from 'crypto';
1+
import { createHash } from 'node:crypto';
22

33
function md5(bytes: Uint8Array) {
44
if (Array.isArray(bytes)) {

src/native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { randomUUID } from 'crypto';
1+
import { randomUUID } from 'node:crypto';
22

33
export default { randomUUID };

src/rng.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { randomFillSync } from 'crypto';
1+
import { randomFillSync } from 'node:crypto';
22

33
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
44
let poolPtr = rnds8Pool.length;

src/sha1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createHash } from 'crypto';
1+
import { createHash } from 'node:crypto';
22

33
function sha1(bytes: Uint8Array) {
44
if (Array.isArray(bytes)) {

0 commit comments

Comments
 (0)