@xtia/alea-rc 0.0.1 → 0.0.2

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/README.md CHANGED
@@ -7,7 +7,7 @@ Alea is a utility wrapper for turning random numbers into useful values. Give it
7
7
  * Fully typed
8
8
  * Crypto-safe and seeded algorithms out-of-the-box
9
9
  * No dependencies
10
- * ~2.7kb minified
10
+ * ~2.3kb minified
11
11
  * Ranged int, array shuffling, dice roll, weighted sampling, phrase generation, uuid, bytes and many more
12
12
 
13
13
  ## Brief:
@@ -53,7 +53,7 @@ export declare class Alea {
53
53
  * @param charset
54
54
  * @returns Generated string
55
55
  */
56
- string(length: number, charset?: string): string;
56
+ string(length: number, charset: string): string;
57
57
  /**
58
58
  * Generates a phrase from a table and a root string
59
59
  * @example
package/internal/alea.js CHANGED
@@ -1,4 +1,3 @@
1
- import { charsets } from "./util";
2
1
  export class Alea {
3
2
  /**
4
3
  * @param next Source RNG - a function that returns a value >= 0 and < 1
@@ -75,7 +74,7 @@ export class Alea {
75
74
  * @param charset
76
75
  * @returns Generated string
77
76
  */
78
- string(length, charset = charsets.alphanumericMixedCase) {
77
+ string(length, charset) {
79
78
  if (!Number.isInteger(length) || length < 0)
80
79
  throw new RangeError("length must be a non-negative integer");
81
80
  if (!charset || charset.length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtia/alea-rc",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "RNG utilities",
5
5
  "repository": {
6
6
  "url": "https://github.com/tiadrop/alea",