Skip to content

Commit 15599ee

Browse files
committed
Change default to not use Math.random
1 parent bfa03fc commit 15599ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/ulid.es.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function decodeTime(id) {
9595
}
9696
return time;
9797
}
98-
function detectPrng(allowInsecure = true, root) {
98+
function detectPrng(allowInsecure = false, root) {
9999
if (!root) {
100100
root = typeof window !== "undefined" ? window : null;
101101
}

dist/ulid.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function decodeTime(id) {
9898
return time;
9999
}
100100
function detectPrng() {
101-
var allowInsecure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
101+
var allowInsecure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
102102
var root = arguments[1];
103103

104104
if (!root) {

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function decodeTime(id: string): number {
115115
return time
116116
}
117117

118-
export function detectPrng(allowInsecure: boolean = true, root?: any): PRNG {
118+
export function detectPrng(allowInsecure: boolean = false, root?: any): PRNG {
119119
if (!root) {
120120
root = typeof window !== "undefined" ? window : null
121121
}

0 commit comments

Comments
 (0)