Skip to content

Commit 12152ad

Browse files
author
Simon Hofmann
committed
(#13) Updated imports to only import required parts
1 parent 7eeaf67 commit 12152ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/random.function.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import * as crypto from "crypto";
1+
import {randomBytes} from "crypto";
22

33
export const generateRandom = (params: { byteLength: number } = {
44
byteLength: 16,
55
}): Promise<Buffer> => {
66
return new Promise((resolve, reject) => {
7-
crypto.randomBytes(params.byteLength, (err, buffer) => {
7+
randomBytes(params.byteLength, (err, buffer) => {
88
if (err) {
99
reject(err);
1010
} else {

0 commit comments

Comments
 (0)