@oscarpalmer/atoms 0.82.0 → 0.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/random.cjs +2 -2
- package/dist/random.js +2 -2
- package/package.json +1 -1
- package/src/random.ts +2 -2
- package/types/index.d.cts +2 -2
- package/types/random.d.cts +2 -2
- package/types/random.d.ts +2 -2
package/dist/index.cjs
CHANGED
|
@@ -79,7 +79,7 @@ exports.toQuery = query.toQuery;
|
|
|
79
79
|
exports.queue = queue.queue;
|
|
80
80
|
exports.getRandomBoolean = random.getRandomBoolean;
|
|
81
81
|
exports.getRandomCharacters = random.getRandomCharacters;
|
|
82
|
-
exports.
|
|
82
|
+
exports.getRandomColor = random.getRandomColor;
|
|
83
83
|
exports.getRandomFloat = random.getRandomFloat;
|
|
84
84
|
exports.getRandomHex = random.getRandomHex;
|
|
85
85
|
exports.getRandomInteger = random.getRandomInteger;
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { average, max, min, round, sum } from "./math.js";
|
|
|
8
8
|
import { between, clamp, getNumber } from "./number.js";
|
|
9
9
|
import { fromQuery, toQuery } from "./query.js";
|
|
10
10
|
import { queue } from "./queue.js";
|
|
11
|
-
import { getRandomBoolean, getRandomCharacters,
|
|
11
|
+
import { getRandomBoolean, getRandomCharacters, getRandomColor, getRandomFloat, getRandomHex, getRandomInteger, getRandomItem, getRandomItems } from "./random.js";
|
|
12
12
|
import { SizedMap, SizedSet } from "./sized.js";
|
|
13
13
|
import { createUuid, getString, join, parse, truncate, words } from "./string/index.js";
|
|
14
14
|
import "./touch.js";
|
|
@@ -77,7 +77,7 @@ export {
|
|
|
77
77
|
getRGBColor,
|
|
78
78
|
getRandomBoolean,
|
|
79
79
|
getRandomCharacters,
|
|
80
|
-
|
|
80
|
+
getRandomColor,
|
|
81
81
|
getRandomFloat,
|
|
82
82
|
getRandomHex,
|
|
83
83
|
getRandomInteger,
|
package/dist/random.cjs
CHANGED
|
@@ -15,7 +15,7 @@ function getRandomCharacters(length, selection) {
|
|
|
15
15
|
}
|
|
16
16
|
return characters;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function getRandomColor() {
|
|
19
19
|
return `#${Array.from({ length: 6 }, getRandomHex).join("")}`;
|
|
20
20
|
}
|
|
21
21
|
function getRandomFloat(min, max) {
|
|
@@ -39,7 +39,7 @@ function getRandomItems(array, amount) {
|
|
|
39
39
|
}
|
|
40
40
|
exports.getRandomBoolean = getRandomBoolean;
|
|
41
41
|
exports.getRandomCharacters = getRandomCharacters;
|
|
42
|
-
exports.
|
|
42
|
+
exports.getRandomColor = getRandomColor;
|
|
43
43
|
exports.getRandomFloat = getRandomFloat;
|
|
44
44
|
exports.getRandomHex = getRandomHex;
|
|
45
45
|
exports.getRandomInteger = getRandomInteger;
|
package/dist/random.js
CHANGED
|
@@ -13,7 +13,7 @@ function getRandomCharacters(length, selection) {
|
|
|
13
13
|
}
|
|
14
14
|
return characters;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function getRandomColor() {
|
|
17
17
|
return `#${Array.from({ length: 6 }, getRandomHex).join("")}`;
|
|
18
18
|
}
|
|
19
19
|
function getRandomFloat(min, max) {
|
|
@@ -38,7 +38,7 @@ function getRandomItems(array, amount) {
|
|
|
38
38
|
export {
|
|
39
39
|
getRandomBoolean,
|
|
40
40
|
getRandomCharacters,
|
|
41
|
-
|
|
41
|
+
getRandomColor,
|
|
42
42
|
getRandomFloat,
|
|
43
43
|
getRandomHex,
|
|
44
44
|
getRandomInteger,
|
package/package.json
CHANGED
package/src/random.ts
CHANGED
|
@@ -34,9 +34,9 @@ export function getRandomCharacters(
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Get a random hexadecimal
|
|
37
|
+
* Get a random hexadecimal color
|
|
38
38
|
*/
|
|
39
|
-
export function
|
|
39
|
+
export function getRandomColor(): string {
|
|
40
40
|
return `#${Array.from({length: 6}, getRandomHex).join('')}`;
|
|
41
41
|
}
|
|
42
42
|
|
package/types/index.d.cts
CHANGED
|
@@ -94,9 +94,9 @@ export declare function getRandomCharacters(
|
|
|
94
94
|
selection?: string,
|
|
95
95
|
): string;
|
|
96
96
|
/**
|
|
97
|
-
* Get a random hexadecimal
|
|
97
|
+
* Get a random hexadecimal color
|
|
98
98
|
*/
|
|
99
|
-
export declare function
|
|
99
|
+
export declare function getRandomColor(): string;
|
|
100
100
|
/**
|
|
101
101
|
* Get a random floating-point number
|
|
102
102
|
*/
|
package/types/random.d.cts
CHANGED
|
@@ -10,9 +10,9 @@ export declare function getRandomBoolean(): boolean;
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function getRandomCharacters(length: number, selection?: string): string;
|
|
12
12
|
/**
|
|
13
|
-
* Get a random hexadecimal
|
|
13
|
+
* Get a random hexadecimal color
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
15
|
+
export declare function getRandomColor(): string;
|
|
16
16
|
/**
|
|
17
17
|
* Get a random floating-point number
|
|
18
18
|
*/
|
package/types/random.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export declare function getRandomBoolean(): boolean;
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function getRandomCharacters(length: number, selection?: string): string;
|
|
10
10
|
/**
|
|
11
|
-
* Get a random hexadecimal
|
|
11
|
+
* Get a random hexadecimal color
|
|
12
12
|
*/
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function getRandomColor(): string;
|
|
14
14
|
/**
|
|
15
15
|
* Get a random floating-point number
|
|
16
16
|
*/
|