@fgv/ts-random 5.1.0-27 → 5.1.0-29

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.
@@ -34,7 +34,7 @@ export class SeededRandomSource {
34
34
  * @param init - The constructor parameters.
35
35
  */
36
36
  constructor(init) {
37
- this.currentState = init.state;
37
+ this._currentState = init.state;
38
38
  this.seed = init.seed;
39
39
  this._counter = init.counter;
40
40
  this._step = init.step;
@@ -59,8 +59,8 @@ export class SeededRandomSource {
59
59
  */
60
60
  next() {
61
61
  this._counter += 1;
62
- const { value, nextState } = this._step(this.currentState);
63
- this.currentState = nextState;
62
+ const { value, nextState } = this._step(this._currentState);
63
+ this._currentState = nextState;
64
64
  return value;
65
65
  }
66
66
  /**
@@ -69,7 +69,7 @@ export class SeededRandomSource {
69
69
  */
70
70
  clone() {
71
71
  return new SeededRandomSource({
72
- state: this.currentState,
72
+ state: this._currentState,
73
73
  seed: this.seed,
74
74
  counter: this._counter,
75
75
  lineage: this.lineage,
@@ -82,7 +82,7 @@ export class SeededRandomSource {
82
82
  * @returns A new seeded random source with a hashed state and label.
83
83
  */
84
84
  createChild(label) {
85
- const { seed, state } = SeededRandomSource.hashStateAndLabel(this.currentState, label);
85
+ const { seed, state } = SeededRandomSource.hashStateAndLabel(this._currentState, label);
86
86
  const lineage = [...this.lineage, `${this._counter}:${label}`];
87
87
  return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });
88
88
  }
@@ -94,7 +94,9 @@ export class SeededRandomSource {
94
94
  static mulberryStep(currentState) {
95
95
  const nextState = (currentState + 0x6d2b79f5) >>> 0;
96
96
  let t = nextState;
97
+ // eslint-disable-next-line no-bitwise
97
98
  t = Math.imul(t ^ (t >>> 15), t | 1);
99
+ // eslint-disable-next-line no-bitwise
98
100
  t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
99
101
  const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;
100
102
  return { value, nextState };
@@ -112,7 +114,7 @@ export class SeededRandomSource {
112
114
  if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {
113
115
  return { seed, state: parsedSeed };
114
116
  }
115
- return { seed, state: SeededRandomSource.hashString(seed) };
117
+ return { seed, state: SeededRandomSource._hashString(seed) };
116
118
  }
117
119
  /**
118
120
  * Hashes a state and label.
@@ -122,14 +124,14 @@ export class SeededRandomSource {
122
124
  */
123
125
  static hashStateAndLabel(state, label) {
124
126
  const seed = `${state >>> 0}:${label}`;
125
- return { seed, state: SeededRandomSource.hashString(seed) };
127
+ return { seed, state: SeededRandomSource._hashString(seed) };
126
128
  }
127
129
  /**
128
130
  * Hashes a string value.
129
131
  * @param value - The string value.
130
132
  * @returns A hashed string value.
131
133
  */
132
- static hashString(value) {
134
+ static _hashString(value) {
133
135
  let hash = 0x811c9dc5;
134
136
  for (let index = 0; index < value.length; index++) {
135
137
  hash ^= value.charCodeAt(index);
@@ -1 +1 @@
1
- {"version":3,"file":"randomSource.js","sourceRoot":"","sources":["../../src/generator/randomSource.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;AAEZ,OAAO,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AA+CtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAO7B;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,YAAsB,IAA0C;QAC9D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAA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O,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAChD,CAAC;QACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QACrC,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAAC,KAAa,EAAE,KAAa;QAC1D,MAAM,IAAI,GAAG,GAAG,KAAK,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC;QACvC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,UAAU,CAAC,KAAa;QACrC,IAAI,IAAI,GAAG,UAAU,CAAC;QAEtB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;YAClD,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAChC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,KAAK,CAAC,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nimport { captureResult, Result } from '@fgv/ts-utils';\n\n/**\n * Represents a seed as both a string and a number.\n * @public\n */\nexport interface ISeedPair {\n seed: string;\n state: number;\n}\n\n/**\n * Result of an internal next() operation.\n * @public\n */\nexport interface INextResult {\n value: number;\n nextState: number;\n}\n\n/**\n * Function that steps a random number generator state and returns the next value.\n * @public\n */\nexport type RandomStepFunction = (state: number) => INextResult;\n\n/**\n * Constructor params for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceConstructorParams {\n state: number;\n seed: string;\n counter: number;\n lineage: ReadonlyArray<string>;\n step: RandomStepFunction;\n}\n\n/**\n * Static create parameters for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceCreateParams {\n seed?: number | string;\n step?: RandomStepFunction;\n}\n\n/**\n * Seeded random number generator that can be cloned and used for deterministic generation.\n * @public\n */\nexport class SeededRandomSource {\n private currentState: number;\n public readonly seed: string;\n public readonly lineage: ReadonlyArray<string>;\n private _counter: number;\n private _step: RandomStepFunction;\n\n /**\n * Gets the current counter value.\n */\n public get counter(): number {\n return this._counter;\n }\n\n /**\n * Creates a new seeded random source.\n * @param init - The constructor parameters.\n */\n protected constructor(init: ISeededRandomSourceConstructorParams) {\n this.currentState = init.state;\n this.seed = init.seed;\n this._counter = init.counter;\n this._step = init.step;\n this.lineage = init.lineage;\n }\n\n /**\n * Creates a new seeded random source from an optional seed.\n * @param seed - The optional seed value.\n * @returns A new seeded random source.\n */\n public static create(seed?: number | string): Result<SeededRandomSource>;\n\n /**\n * Creates a new seeded random source from {@link Generator.ISeededRandomSourceCreateParams | ISeededRandomSourceCreateParams}.\n * @param init - The initialization parameters.\n * @returns A new seeded random source.\n */\n public static create(init: ISeededRandomSourceCreateParams): Result<SeededRandomSource>;\n\n public static create(\n seedOrInit?: number | string | ISeededRandomSourceCreateParams\n ): Result<SeededRandomSource> {\n const init = typeof seedOrInit === 'object' ? seedOrInit : { seed: seedOrInit };\n const step = init?.step ?? SeededRandomSource.mulberryStep;\n const { seed, state } = SeededRandomSource.hashSeed(init?.seed ?? Date.now());\n return captureResult(\n () =>\n new SeededRandomSource({\n state,\n seed,\n counter: 0,\n lineage: [],\n step\n })\n );\n }\n\n /**\n * Generates the next random number.\n * @returns A random number between 0 and 1.\n */\n public next(): number {\n this._counter += 1;\n const { value, nextState } = this._step(this.currentState);\n this.currentState = nextState;\n return value;\n }\n\n /**\n * Creates a clone of this random source.\n * @returns A new seeded random source with the same state.\n */\n public clone(): SeededRandomSource {\n return new SeededRandomSource({\n state: this.currentState,\n seed: this.seed,\n counter: this._counter,\n lineage: this.lineage,\n step: this._step\n });\n }\n\n /**\n * Creates a child random source with a label.\n * @param label - The label for the child.\n * @returns A new seeded random source with a hashed state and label.\n */\n public createChild(label: string): SeededRandomSource {\n const { seed, state } = SeededRandomSource.hashStateAndLabel(this.currentState, label);\n const lineage = [...this.lineage, `${this._counter}:${label}`];\n return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });\n }\n\n /**\n * Steps a mulberry32 random number generator state and returns the next value.\n * @param currentState - The current state of the generator.\n * @returns The next random number and the next state.\n */\n public static mulberryStep(currentState: number): INextResult {\n const nextState = (currentState + 0x6d2b79f5) >>> 0;\n\n let t = nextState;\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n return { value, nextState };\n }\n\n /**\n * Hashes a seed value.\n * @param seed - The seed value.\n * @returns A hashed seed value.\n */\n public static hashSeed(seed: number | string): ISeedPair {\n if (typeof seed === 'number') {\n return { seed: seed.toString(), state: seed };\n }\n const parsedSeed = Number(seed);\n if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {\n return { seed, state: parsedSeed };\n }\n return { seed, state: SeededRandomSource.hashString(seed) };\n }\n\n /**\n * Hashes a state and label.\n * @param state - The state value.\n * @param label - The label value.\n * @returns A hashed state and label value.\n */\n public static hashStateAndLabel(state: number, label: string): ISeedPair {\n const seed = `${state >>> 0}:${label}`;\n return { seed, state: SeededRandomSource.hashString(seed) };\n }\n\n /**\n * Hashes a string value.\n * @param value - The string value.\n * @returns A hashed string value.\n */\n private static hashString(value: string): number {\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < value.length; index++) {\n hash ^= value.charCodeAt(index);\n hash = Math.imul(hash, 0x01000193);\n }\n\n return hash >>> 0;\n }\n}\n"]}
1
+ {"version":3,"file":"randomSource.js","sourceRoot":"","sources":["../../src/generator/randomSource.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;AAEZ,OAAO,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AA+CtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAO7B;;OAEG;IACH,IA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KAAK,CAAC,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nimport { captureResult, Result } from '@fgv/ts-utils';\n\n/**\n * Represents a seed as both a string and a number.\n * @public\n */\nexport interface ISeedPair {\n seed: string;\n state: number;\n}\n\n/**\n * Result of an internal next() operation.\n * @public\n */\nexport interface INextResult {\n value: number;\n nextState: number;\n}\n\n/**\n * Function that steps a random number generator state and returns the next value.\n * @public\n */\nexport type RandomStepFunction = (state: number) => INextResult;\n\n/**\n * Constructor params for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceConstructorParams {\n state: number;\n seed: string;\n counter: number;\n lineage: ReadonlyArray<string>;\n step: RandomStepFunction;\n}\n\n/**\n * Static create parameters for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceCreateParams {\n seed?: number | string;\n step?: RandomStepFunction;\n}\n\n/**\n * Seeded random number generator that can be cloned and used for deterministic generation.\n * @public\n */\nexport class SeededRandomSource {\n private _currentState: number;\n public readonly seed: string;\n public readonly lineage: ReadonlyArray<string>;\n private _counter: number;\n private _step: RandomStepFunction;\n\n /**\n * Gets the current counter value.\n */\n public get counter(): number {\n return this._counter;\n }\n\n /**\n * Creates a new seeded random source.\n * @param init - The constructor parameters.\n */\n protected constructor(init: ISeededRandomSourceConstructorParams) {\n this._currentState = init.state;\n this.seed = init.seed;\n this._counter = init.counter;\n this._step = init.step;\n this.lineage = init.lineage;\n }\n\n /**\n * Creates a new seeded random source from an optional seed.\n * @param seed - The optional seed value.\n * @returns A new seeded random source.\n */\n public static create(seed?: number | string): Result<SeededRandomSource>;\n\n /**\n * Creates a new seeded random source from {@link Generator.ISeededRandomSourceCreateParams | ISeededRandomSourceCreateParams}.\n * @param init - The initialization parameters.\n * @returns A new seeded random source.\n */\n public static create(init: ISeededRandomSourceCreateParams): Result<SeededRandomSource>;\n\n public static create(\n seedOrInit?: number | string | ISeededRandomSourceCreateParams\n ): Result<SeededRandomSource> {\n const init = typeof seedOrInit === 'object' ? seedOrInit : { seed: seedOrInit };\n const step = init?.step ?? SeededRandomSource.mulberryStep;\n const { seed, state } = SeededRandomSource.hashSeed(init?.seed ?? Date.now());\n return captureResult(\n () =>\n new SeededRandomSource({\n state,\n seed,\n counter: 0,\n lineage: [],\n step\n })\n );\n }\n\n /**\n * Generates the next random number.\n * @returns A random number between 0 and 1.\n */\n public next(): number {\n this._counter += 1;\n const { value, nextState } = this._step(this._currentState);\n this._currentState = nextState;\n return value;\n }\n\n /**\n * Creates a clone of this random source.\n * @returns A new seeded random source with the same state.\n */\n public clone(): SeededRandomSource {\n return new SeededRandomSource({\n state: this._currentState,\n seed: this.seed,\n counter: this._counter,\n lineage: this.lineage,\n step: this._step\n });\n }\n\n /**\n * Creates a child random source with a label.\n * @param label - The label for the child.\n * @returns A new seeded random source with a hashed state and label.\n */\n public createChild(label: string): SeededRandomSource {\n const { seed, state } = SeededRandomSource.hashStateAndLabel(this._currentState, label);\n const lineage = [...this.lineage, `${this._counter}:${label}`];\n return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });\n }\n\n /**\n * Steps a mulberry32 random number generator state and returns the next value.\n * @param currentState - The current state of the generator.\n * @returns The next random number and the next state.\n */\n public static mulberryStep(currentState: number): INextResult {\n const nextState = (currentState + 0x6d2b79f5) >>> 0;\n\n let t = nextState;\n // eslint-disable-next-line no-bitwise\n t = Math.imul(t ^ (t >>> 15), t | 1);\n // eslint-disable-next-line no-bitwise\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n return { value, nextState };\n }\n\n /**\n * Hashes a seed value.\n * @param seed - The seed value.\n * @returns A hashed seed value.\n */\n public static hashSeed(seed: number | string): ISeedPair {\n if (typeof seed === 'number') {\n return { seed: seed.toString(), state: seed };\n }\n const parsedSeed = Number(seed);\n if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {\n return { seed, state: parsedSeed };\n }\n return { seed, state: SeededRandomSource._hashString(seed) };\n }\n\n /**\n * Hashes a state and label.\n * @param state - The state value.\n * @param label - The label value.\n * @returns A hashed state and label value.\n */\n public static hashStateAndLabel(state: number, label: string): ISeedPair {\n const seed = `${state >>> 0}:${label}`;\n return { seed, state: SeededRandomSource._hashString(seed) };\n }\n\n /**\n * Hashes a string value.\n * @param value - The string value.\n * @returns A hashed string value.\n */\n private static _hashString(value: string): number {\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < value.length; index++) {\n hash ^= value.charCodeAt(index);\n hash = Math.imul(hash, 0x01000193);\n }\n\n return hash >>> 0;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5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,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,qBAAqB;IACrB,QAAQ;IACR,WAAW;IACX,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,kBAAkB;IAClB,yBAAyB;IACzB,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,mBAAmB;IACnB,gBAAgB;IAChB,UAAU;IACV,uBAAuB;IACvB,aAAa;IACb,kBAAkB;IAClB,OAAO;IACP,cAAc;IACd,wBAAwB;IACxB,aAAa;IACb,WAAW;IACX,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,cAAc;IACd,oBAAoB;IACpB,WAAW;IACX,WAAW;IACX,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,qBAAqB;IACrB,UAAU;IACV,iBAAiB;IACjB,WAAW;IACX,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,6BAA6B;IAC7B,2BAA2B;IAC3B,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,kBAAkB;IAClB,UAAU;IACV,oBAAoB;IACpB,uBAAuB;IACvB,eAAe;IACf,eAAe;IACf,oBAAoB;IACpB,mBAAmB;IACnB,cAAc;IACd,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,QAAQ;IACR,WAAW;CACZ,CAAC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nexport const jobs = [\n 'Accountant',\n 'Actor',\n 'Actuary',\n 'Administrator',\n 'Advertising Manager',\n 'Aerospace Engineer',\n 'Agricultural Scientist',\n 'Air Traffic Controller',\n 'Animator',\n 'Anthropologist',\n 'Archaeologist',\n 'Architect',\n 'Art Director',\n 'Astronomer',\n 'Attorney',\n 'Audiologist',\n 'Baker',\n 'Banker',\n 'Barber',\n 'Biologist',\n 'Biomedical Engineer',\n 'Bookkeeper',\n 'Broadcast Technician',\n 'Bus Driver',\n 'Business Analyst',\n 'Carpenter',\n 'Cartographer',\n 'Chef',\n 'Chemical Engineer',\n 'Chemist',\n 'Chiropractor',\n 'Civil Engineer',\n 'Clinical Psychologist',\n 'Coach',\n 'Computer Programmer',\n 'Construction Manager',\n 'Consultant',\n 'Content Writer',\n 'Copywriter',\n 'Counselor',\n 'Court Reporter',\n 'Curator',\n 'Data Analyst',\n 'Data Scientist',\n 'Database Administrator',\n 'Dental Hygienist',\n 'Dentist',\n 'Dermatologist',\n 'Dietitian',\n 'Director',\n 'Economist',\n 'Editor',\n 'Electrical Engineer',\n 'Electrician',\n 'Elementary School Teacher',\n 'Emergency Medical Technician',\n 'Engineer',\n 'Environmental Scientist',\n 'Epidemiologist',\n 'Event Planner',\n 'Fashion Designer',\n 'Film Director',\n 'Financial Advisor',\n 'Financial Analyst',\n 'Firefighter',\n 'Fitness Trainer',\n 'Flight Attendant',\n 'Florist',\n 'Forensic Scientist',\n 'Fundraiser',\n 'Geologist',\n 'Graphic Designer',\n 'Hairdresser',\n 'Health Educator',\n 'Historian',\n 'Human Resources Manager',\n 'Industrial Designer',\n 'Industrial Engineer',\n 'Insurance Agent',\n 'Interior Designer',\n 'Interpreter',\n 'Investment Banker',\n 'IT Manager',\n 'Journalist',\n 'Judge',\n 'Landscape Architect',\n 'Lawyer',\n 'Librarian',\n 'Loan Officer',\n 'Logistician',\n 'Machine Operator',\n 'Makeup Artist',\n 'Management Consultant',\n 'Manufacturing Engineer',\n 'Marine Biologist',\n 'Market Research Analyst',\n 'Marketing Manager',\n 'Massage Therapist',\n 'Mathematician',\n 'Mechanical Engineer',\n 'Medical Assistant',\n 'Microbiologist',\n 'Musician',\n 'Network Administrator',\n 'Neurologist',\n 'Nuclear Engineer',\n 'Nurse',\n 'Nutritionist',\n 'Occupational Therapist',\n 'Optometrist',\n 'Paralegal',\n 'Paramedic',\n 'Park Ranger',\n 'Pediatrician',\n 'Pharmacist',\n 'Photographer',\n 'Physical Therapist',\n 'Physician',\n 'Physicist',\n 'Pilot',\n 'Plumber',\n 'Police Officer',\n 'Political Scientist',\n 'Producer',\n 'Product Manager',\n 'Professor',\n 'Project Manager',\n 'Psychiatrist',\n 'Psychologist',\n 'Public Relations Specialist',\n 'Quality Assurance Analyst',\n 'Radiologist',\n 'Real Estate Agent',\n 'Receptionist',\n 'Registered Nurse',\n 'Reporter',\n 'Research Scientist',\n 'Respiratory Therapist',\n 'Sales Manager',\n 'Social Worker',\n 'Software Developer',\n 'Software Engineer',\n 'Statistician',\n 'Surgeon',\n 'Surveyor',\n 'Systems Analyst',\n 'Teacher',\n 'Technical Writer',\n 'Urban Planner',\n 'Veterinarian',\n 'Web Developer',\n 'Writer',\n 'Zoologist'\n];\n"]}
1
+ {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gF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qBAAqB;IACrB,iBAAiB;IACjB,mBAAmB;IACnB,aAAa;IACb,mBAAmB;IACnB,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,qBAAqB;IACrB,QAAQ;IACR,WAAW;IACX,cAAc;IACd,aAAa;IACb,kBAAkB;IAClB,eAAe;IACf,uBAAuB;IACvB,wBAAwB;IACxB,kBAAkB;IAClB,yBAAyB;IACzB,mBAAmB;IACnB,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,mBAAmB;IACnB,gBAAgB;IAChB,UAAU;IACV,uBAAuB;IACvB,aAAa;IACb,kBAAkB;IAClB,OAAO;IACP,cAAc;IACd,wBAAwB;IACxB,aAAa;IACb,WAAW;IACX,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,cAAc;IACd,oBAAoB;IACpB,WAAW;IACX,WAAW;IACX,OAAO;IACP,SAAS;IACT,gBAAgB;IAChB,qBAAqB;IACrB,UAAU;IACV,iBAAiB;IACjB,WAAW;IACX,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,6BAA6B;IAC7B,2BAA2B;IAC3B,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,kBAAkB;IAClB,UAAU;IACV,oBAAoB;IACpB,uBAAuB;IACvB,eAAe;IACf,eAAe;IACf,oBAAoB;IACpB,mBAAmB;IACnB,cAAc;IACd,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,QAAQ;IACR,WAAW;CACH,CAAC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nexport const jobs: string[] = [\n 'Accountant',\n 'Actor',\n 'Actuary',\n 'Administrator',\n 'Advertising Manager',\n 'Aerospace Engineer',\n 'Agricultural Scientist',\n 'Air Traffic Controller',\n 'Animator',\n 'Anthropologist',\n 'Archaeologist',\n 'Architect',\n 'Art Director',\n 'Astronomer',\n 'Attorney',\n 'Audiologist',\n 'Baker',\n 'Banker',\n 'Barber',\n 'Biologist',\n 'Biomedical Engineer',\n 'Bookkeeper',\n 'Broadcast Technician',\n 'Bus Driver',\n 'Business Analyst',\n 'Carpenter',\n 'Cartographer',\n 'Chef',\n 'Chemical Engineer',\n 'Chemist',\n 'Chiropractor',\n 'Civil Engineer',\n 'Clinical Psychologist',\n 'Coach',\n 'Computer Programmer',\n 'Construction Manager',\n 'Consultant',\n 'Content Writer',\n 'Copywriter',\n 'Counselor',\n 'Court Reporter',\n 'Curator',\n 'Data Analyst',\n 'Data Scientist',\n 'Database Administrator',\n 'Dental Hygienist',\n 'Dentist',\n 'Dermatologist',\n 'Dietitian',\n 'Director',\n 'Economist',\n 'Editor',\n 'Electrical Engineer',\n 'Electrician',\n 'Elementary School Teacher',\n 'Emergency Medical Technician',\n 'Engineer',\n 'Environmental Scientist',\n 'Epidemiologist',\n 'Event Planner',\n 'Fashion Designer',\n 'Film Director',\n 'Financial Advisor',\n 'Financial Analyst',\n 'Firefighter',\n 'Fitness Trainer',\n 'Flight Attendant',\n 'Florist',\n 'Forensic Scientist',\n 'Fundraiser',\n 'Geologist',\n 'Graphic Designer',\n 'Hairdresser',\n 'Health Educator',\n 'Historian',\n 'Human Resources Manager',\n 'Industrial Designer',\n 'Industrial Engineer',\n 'Insurance Agent',\n 'Interior Designer',\n 'Interpreter',\n 'Investment Banker',\n 'IT Manager',\n 'Journalist',\n 'Judge',\n 'Landscape Architect',\n 'Lawyer',\n 'Librarian',\n 'Loan Officer',\n 'Logistician',\n 'Machine Operator',\n 'Makeup Artist',\n 'Management Consultant',\n 'Manufacturing Engineer',\n 'Marine Biologist',\n 'Market Research Analyst',\n 'Marketing Manager',\n 'Massage Therapist',\n 'Mathematician',\n 'Mechanical Engineer',\n 'Medical Assistant',\n 'Microbiologist',\n 'Musician',\n 'Network Administrator',\n 'Neurologist',\n 'Nuclear Engineer',\n 'Nurse',\n 'Nutritionist',\n 'Occupational Therapist',\n 'Optometrist',\n 'Paralegal',\n 'Paramedic',\n 'Park Ranger',\n 'Pediatrician',\n 'Pharmacist',\n 'Photographer',\n 'Physical Therapist',\n 'Physician',\n 'Physicist',\n 'Pilot',\n 'Plumber',\n 'Police Officer',\n 'Political Scientist',\n 'Producer',\n 'Product Manager',\n 'Professor',\n 'Project Manager',\n 'Psychiatrist',\n 'Psychologist',\n 'Public Relations Specialist',\n 'Quality Assurance Analyst',\n 'Radiologist',\n 'Real Estate Agent',\n 'Receptionist',\n 'Registered Nurse',\n 'Reporter',\n 'Research Scientist',\n 'Respiratory Therapist',\n 'Sales Manager',\n 'Social Worker',\n 'Software Developer',\n 'Software Engineer',\n 'Statistician',\n 'Surgeon',\n 'Surveyor',\n 'Systems Analyst',\n 'Teacher',\n 'Technical Writer',\n 'Urban Planner',\n 'Veterinarian',\n 'Web Developer',\n 'Writer',\n 'Zoologist'\n] as const;\n"]}
@@ -0,0 +1,16 @@
1
+ // ESLint 9 flat config
2
+ const nodeProfile = require('@rushstack/eslint-config/flat/profile/node');
3
+ const packletsPlugin = require('@rushstack/eslint-config/flat/mixins/packlets');
4
+ const tsdocPlugin = require('@rushstack/eslint-config/flat/mixins/tsdoc');
5
+
6
+ module.exports = [
7
+ ...nodeProfile,
8
+ packletsPlugin,
9
+ ...tsdocPlugin,
10
+ {
11
+ // Override specific rules if needed
12
+ rules: {
13
+ '@rushstack/packlets/mechanics': 'warn'
14
+ }
15
+ }
16
+ ];
@@ -44,7 +44,7 @@ export interface ISeededRandomSourceCreateParams {
44
44
  * @public
45
45
  */
46
46
  export declare class SeededRandomSource {
47
- private currentState;
47
+ private _currentState;
48
48
  readonly seed: string;
49
49
  readonly lineage: ReadonlyArray<string>;
50
50
  private _counter;
@@ -110,6 +110,6 @@ export declare class SeededRandomSource {
110
110
  * @param value - The string value.
111
111
  * @returns A hashed string value.
112
112
  */
113
- private static hashString;
113
+ private static _hashString;
114
114
  }
115
115
  //# sourceMappingURL=randomSource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"randomSource.d.ts","sourceRoot":"","sources":["../../src/generator/randomSource.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,oCAAoC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,kBAAkB,CAAC;CAC1B;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IACI,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB;IAMrD;;;;OAIG;WACW,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;IAa7D;;;;OAIG;WACW,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAWxD;;;;;OAKG;WACW,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;IAKxE;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;CAU3B"}
@@ -37,7 +37,7 @@ class SeededRandomSource {
37
37
  * @param init - The constructor parameters.
38
38
  */
39
39
  constructor(init) {
40
- this.currentState = init.state;
40
+ this._currentState = init.state;
41
41
  this.seed = init.seed;
42
42
  this._counter = init.counter;
43
43
  this._step = init.step;
@@ -62,8 +62,8 @@ class SeededRandomSource {
62
62
  */
63
63
  next() {
64
64
  this._counter += 1;
65
- const { value, nextState } = this._step(this.currentState);
66
- this.currentState = nextState;
65
+ const { value, nextState } = this._step(this._currentState);
66
+ this._currentState = nextState;
67
67
  return value;
68
68
  }
69
69
  /**
@@ -72,7 +72,7 @@ class SeededRandomSource {
72
72
  */
73
73
  clone() {
74
74
  return new SeededRandomSource({
75
- state: this.currentState,
75
+ state: this._currentState,
76
76
  seed: this.seed,
77
77
  counter: this._counter,
78
78
  lineage: this.lineage,
@@ -85,7 +85,7 @@ class SeededRandomSource {
85
85
  * @returns A new seeded random source with a hashed state and label.
86
86
  */
87
87
  createChild(label) {
88
- const { seed, state } = SeededRandomSource.hashStateAndLabel(this.currentState, label);
88
+ const { seed, state } = SeededRandomSource.hashStateAndLabel(this._currentState, label);
89
89
  const lineage = [...this.lineage, `${this._counter}:${label}`];
90
90
  return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });
91
91
  }
@@ -97,7 +97,9 @@ class SeededRandomSource {
97
97
  static mulberryStep(currentState) {
98
98
  const nextState = (currentState + 0x6d2b79f5) >>> 0;
99
99
  let t = nextState;
100
+ // eslint-disable-next-line no-bitwise
100
101
  t = Math.imul(t ^ (t >>> 15), t | 1);
102
+ // eslint-disable-next-line no-bitwise
101
103
  t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
102
104
  const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;
103
105
  return { value, nextState };
@@ -115,7 +117,7 @@ class SeededRandomSource {
115
117
  if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {
116
118
  return { seed, state: parsedSeed };
117
119
  }
118
- return { seed, state: SeededRandomSource.hashString(seed) };
120
+ return { seed, state: SeededRandomSource._hashString(seed) };
119
121
  }
120
122
  /**
121
123
  * Hashes a state and label.
@@ -125,14 +127,14 @@ class SeededRandomSource {
125
127
  */
126
128
  static hashStateAndLabel(state, label) {
127
129
  const seed = `${state >>> 0}:${label}`;
128
- return { seed, state: SeededRandomSource.hashString(seed) };
130
+ return { seed, state: SeededRandomSource._hashString(seed) };
129
131
  }
130
132
  /**
131
133
  * Hashes a string value.
132
134
  * @param value - The string value.
133
135
  * @returns A hashed string value.
134
136
  */
135
- static hashString(value) {
137
+ static _hashString(value) {
136
138
  let hash = 0x811c9dc5;
137
139
  for (let index = 0; index < value.length; index++) {
138
140
  hash ^= value.charCodeAt(index);
@@ -1 +1 @@
1
- {"version":3,"file":"randomSource.js","sourceRoot":"","sources":["../../src/generator/randomSource.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEZ,4CAAsD;AA+CtD;;;GAGG;AACH,MAAa,kBAAkB;IAO7B;;OAEG;IACH,IAAW,OAAO;QAChB,OAA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D,gDAwJC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nimport { captureResult, Result } from '@fgv/ts-utils';\n\n/**\n * Represents a seed as both a string and a number.\n * @public\n */\nexport interface ISeedPair {\n seed: string;\n state: number;\n}\n\n/**\n * Result of an internal next() operation.\n * @public\n */\nexport interface INextResult {\n value: number;\n nextState: number;\n}\n\n/**\n * Function that steps a random number generator state and returns the next value.\n * @public\n */\nexport type RandomStepFunction = (state: number) => INextResult;\n\n/**\n * Constructor params for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceConstructorParams {\n state: number;\n seed: string;\n counter: number;\n lineage: ReadonlyArray<string>;\n step: RandomStepFunction;\n}\n\n/**\n * Static create parameters for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceCreateParams {\n seed?: number | string;\n step?: RandomStepFunction;\n}\n\n/**\n * Seeded random number generator that can be cloned and used for deterministic generation.\n * @public\n */\nexport class SeededRandomSource {\n private currentState: number;\n public readonly seed: string;\n public readonly lineage: ReadonlyArray<string>;\n private _counter: number;\n private _step: RandomStepFunction;\n\n /**\n * Gets the current counter value.\n */\n public get counter(): number {\n return this._counter;\n }\n\n /**\n * Creates a new seeded random source.\n * @param init - The constructor parameters.\n */\n protected constructor(init: ISeededRandomSourceConstructorParams) {\n this.currentState = init.state;\n this.seed = init.seed;\n this._counter = init.counter;\n this._step = init.step;\n this.lineage = init.lineage;\n }\n\n /**\n * Creates a new seeded random source from an optional seed.\n * @param seed - The optional seed value.\n * @returns A new seeded random source.\n */\n public static create(seed?: number | string): Result<SeededRandomSource>;\n\n /**\n * Creates a new seeded random source from {@link Generator.ISeededRandomSourceCreateParams | ISeededRandomSourceCreateParams}.\n * @param init - The initialization parameters.\n * @returns A new seeded random source.\n */\n public static create(init: ISeededRandomSourceCreateParams): Result<SeededRandomSource>;\n\n public static create(\n seedOrInit?: number | string | ISeededRandomSourceCreateParams\n ): Result<SeededRandomSource> {\n const init = typeof seedOrInit === 'object' ? seedOrInit : { seed: seedOrInit };\n const step = init?.step ?? SeededRandomSource.mulberryStep;\n const { seed, state } = SeededRandomSource.hashSeed(init?.seed ?? Date.now());\n return captureResult(\n () =>\n new SeededRandomSource({\n state,\n seed,\n counter: 0,\n lineage: [],\n step\n })\n );\n }\n\n /**\n * Generates the next random number.\n * @returns A random number between 0 and 1.\n */\n public next(): number {\n this._counter += 1;\n const { value, nextState } = this._step(this.currentState);\n this.currentState = nextState;\n return value;\n }\n\n /**\n * Creates a clone of this random source.\n * @returns A new seeded random source with the same state.\n */\n public clone(): SeededRandomSource {\n return new SeededRandomSource({\n state: this.currentState,\n seed: this.seed,\n counter: this._counter,\n lineage: this.lineage,\n step: this._step\n });\n }\n\n /**\n * Creates a child random source with a label.\n * @param label - The label for the child.\n * @returns A new seeded random source with a hashed state and label.\n */\n public createChild(label: string): SeededRandomSource {\n const { seed, state } = SeededRandomSource.hashStateAndLabel(this.currentState, label);\n const lineage = [...this.lineage, `${this._counter}:${label}`];\n return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });\n }\n\n /**\n * Steps a mulberry32 random number generator state and returns the next value.\n * @param currentState - The current state of the generator.\n * @returns The next random number and the next state.\n */\n public static mulberryStep(currentState: number): INextResult {\n const nextState = (currentState + 0x6d2b79f5) >>> 0;\n\n let t = nextState;\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n return { value, nextState };\n }\n\n /**\n * Hashes a seed value.\n * @param seed - The seed value.\n * @returns A hashed seed value.\n */\n public static hashSeed(seed: number | string): ISeedPair {\n if (typeof seed === 'number') {\n return { seed: seed.toString(), state: seed };\n }\n const parsedSeed = Number(seed);\n if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {\n return { seed, state: parsedSeed };\n }\n return { seed, state: SeededRandomSource.hashString(seed) };\n }\n\n /**\n * Hashes a state and label.\n * @param state - The state value.\n * @param label - The label value.\n * @returns A hashed state and label value.\n */\n public static hashStateAndLabel(state: number, label: string): ISeedPair {\n const seed = `${state >>> 0}:${label}`;\n return { seed, state: SeededRandomSource.hashString(seed) };\n }\n\n /**\n * Hashes a string value.\n * @param value - The string value.\n * @returns A hashed string value.\n */\n private static hashString(value: string): number {\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < value.length; index++) {\n hash ^= value.charCodeAt(index);\n hash = Math.imul(hash, 0x01000193);\n }\n\n return hash >>> 0;\n }\n}\n"]}
1
+ {"version":3,"file":"randomSource.js","sourceRoot":"","sources":["../../src/generator/randomSource.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6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EAAE,CAAC;YAClD,IAAI,IAAI,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAChC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,KAAK,CAAC,CAAC;IACpB,CAAC;CACF;AA1JD,gDA0JC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nimport { captureResult, Result } from '@fgv/ts-utils';\n\n/**\n * Represents a seed as both a string and a number.\n * @public\n */\nexport interface ISeedPair {\n seed: string;\n state: number;\n}\n\n/**\n * Result of an internal next() operation.\n * @public\n */\nexport interface INextResult {\n value: number;\n nextState: number;\n}\n\n/**\n * Function that steps a random number generator state and returns the next value.\n * @public\n */\nexport type RandomStepFunction = (state: number) => INextResult;\n\n/**\n * Constructor params for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceConstructorParams {\n state: number;\n seed: string;\n counter: number;\n lineage: ReadonlyArray<string>;\n step: RandomStepFunction;\n}\n\n/**\n * Static create parameters for a {@link Generator.SeededRandomSource | SeededRandomSource}.\n * @public\n */\nexport interface ISeededRandomSourceCreateParams {\n seed?: number | string;\n step?: RandomStepFunction;\n}\n\n/**\n * Seeded random number generator that can be cloned and used for deterministic generation.\n * @public\n */\nexport class SeededRandomSource {\n private _currentState: number;\n public readonly seed: string;\n public readonly lineage: ReadonlyArray<string>;\n private _counter: number;\n private _step: RandomStepFunction;\n\n /**\n * Gets the current counter value.\n */\n public get counter(): number {\n return this._counter;\n }\n\n /**\n * Creates a new seeded random source.\n * @param init - The constructor parameters.\n */\n protected constructor(init: ISeededRandomSourceConstructorParams) {\n this._currentState = init.state;\n this.seed = init.seed;\n this._counter = init.counter;\n this._step = init.step;\n this.lineage = init.lineage;\n }\n\n /**\n * Creates a new seeded random source from an optional seed.\n * @param seed - The optional seed value.\n * @returns A new seeded random source.\n */\n public static create(seed?: number | string): Result<SeededRandomSource>;\n\n /**\n * Creates a new seeded random source from {@link Generator.ISeededRandomSourceCreateParams | ISeededRandomSourceCreateParams}.\n * @param init - The initialization parameters.\n * @returns A new seeded random source.\n */\n public static create(init: ISeededRandomSourceCreateParams): Result<SeededRandomSource>;\n\n public static create(\n seedOrInit?: number | string | ISeededRandomSourceCreateParams\n ): Result<SeededRandomSource> {\n const init = typeof seedOrInit === 'object' ? seedOrInit : { seed: seedOrInit };\n const step = init?.step ?? SeededRandomSource.mulberryStep;\n const { seed, state } = SeededRandomSource.hashSeed(init?.seed ?? Date.now());\n return captureResult(\n () =>\n new SeededRandomSource({\n state,\n seed,\n counter: 0,\n lineage: [],\n step\n })\n );\n }\n\n /**\n * Generates the next random number.\n * @returns A random number between 0 and 1.\n */\n public next(): number {\n this._counter += 1;\n const { value, nextState } = this._step(this._currentState);\n this._currentState = nextState;\n return value;\n }\n\n /**\n * Creates a clone of this random source.\n * @returns A new seeded random source with the same state.\n */\n public clone(): SeededRandomSource {\n return new SeededRandomSource({\n state: this._currentState,\n seed: this.seed,\n counter: this._counter,\n lineage: this.lineage,\n step: this._step\n });\n }\n\n /**\n * Creates a child random source with a label.\n * @param label - The label for the child.\n * @returns A new seeded random source with a hashed state and label.\n */\n public createChild(label: string): SeededRandomSource {\n const { seed, state } = SeededRandomSource.hashStateAndLabel(this._currentState, label);\n const lineage = [...this.lineage, `${this._counter}:${label}`];\n return new SeededRandomSource({ state, seed, counter: 0, lineage, step: this._step });\n }\n\n /**\n * Steps a mulberry32 random number generator state and returns the next value.\n * @param currentState - The current state of the generator.\n * @returns The next random number and the next state.\n */\n public static mulberryStep(currentState: number): INextResult {\n const nextState = (currentState + 0x6d2b79f5) >>> 0;\n\n let t = nextState;\n // eslint-disable-next-line no-bitwise\n t = Math.imul(t ^ (t >>> 15), t | 1);\n // eslint-disable-next-line no-bitwise\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n\n const value = ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n return { value, nextState };\n }\n\n /**\n * Hashes a seed value.\n * @param seed - The seed value.\n * @returns A hashed seed value.\n */\n public static hashSeed(seed: number | string): ISeedPair {\n if (typeof seed === 'number') {\n return { seed: seed.toString(), state: seed };\n }\n const parsedSeed = Number(seed);\n if (!isNaN(parsedSeed) && isFinite(parsedSeed)) {\n return { seed, state: parsedSeed };\n }\n return { seed, state: SeededRandomSource._hashString(seed) };\n }\n\n /**\n * Hashes a state and label.\n * @param state - The state value.\n * @param label - The label value.\n * @returns A hashed state and label value.\n */\n public static hashStateAndLabel(state: number, label: string): ISeedPair {\n const seed = `${state >>> 0}:${label}`;\n return { seed, state: SeededRandomSource._hashString(seed) };\n }\n\n /**\n * Hashes a string value.\n * @param value - The string value.\n * @returns A hashed string value.\n */\n private static _hashString(value: string): number {\n let hash = 0x811c9dc5;\n\n for (let index = 0; index < value.length; index++) {\n hash ^= value.charCodeAt(index);\n hash = Math.imul(hash, 0x01000193);\n }\n\n return hash >>> 0;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,IAAI,UA0JhB,CAAC"}
1
+ {"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,IAAI,EAAE,MAAM,EA0Jf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEC,QAAA,IAAI,GAAG;IAClB,YAAY;IACZ,OAAO;IACP,SAAS;IACT,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,wBAAwB;IACxB,wBAAwB;IACxB,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,cAAc;IACd,YAAY;IACZ,UAAU;IACV,aAAa;IACb,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,qBAAqB;IACrB,YAAY;IACZ,sBAAsB;IACtB,YAAY;IACZ,kBAAkB;IAClB,WAAW;IACX,cAAc;IACd,MAAM;IACN,mBAAmB;IACnB,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,uBAAuB;IACvB,OAAO;IACP,qBAAqB;IACrB,sBAAsB;IACtB,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,wBAAwB;IACxB,kB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Ac;IACd,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,QAAQ;IACR,WAAW;CACZ,CAAC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nexport const jobs = [\n 'Accountant',\n 'Actor',\n 'Actuary',\n 'Administrator',\n 'Advertising Manager',\n 'Aerospace Engineer',\n 'Agricultural Scientist',\n 'Air Traffic Controller',\n 'Animator',\n 'Anthropologist',\n 'Archaeologist',\n 'Architect',\n 'Art Director',\n 'Astronomer',\n 'Attorney',\n 'Audiologist',\n 'Baker',\n 'Banker',\n 'Barber',\n 'Biologist',\n 'Biomedical Engineer',\n 'Bookkeeper',\n 'Broadcast Technician',\n 'Bus Driver',\n 'Business Analyst',\n 'Carpenter',\n 'Cartographer',\n 'Chef',\n 'Chemical Engineer',\n 'Chemist',\n 'Chiropractor',\n 'Civil Engineer',\n 'Clinical Psychologist',\n 'Coach',\n 'Computer Programmer',\n 'Construction Manager',\n 'Consultant',\n 'Content Writer',\n 'Copywriter',\n 'Counselor',\n 'Court Reporter',\n 'Curator',\n 'Data Analyst',\n 'Data Scientist',\n 'Database Administrator',\n 'Dental Hygienist',\n 'Dentist',\n 'Dermatologist',\n 'Dietitian',\n 'Director',\n 'Economist',\n 'Editor',\n 'Electrical Engineer',\n 'Electrician',\n 'Elementary School Teacher',\n 'Emergency Medical Technician',\n 'Engineer',\n 'Environmental Scientist',\n 'Epidemiologist',\n 'Event Planner',\n 'Fashion Designer',\n 'Film Director',\n 'Financial Advisor',\n 'Financial Analyst',\n 'Firefighter',\n 'Fitness Trainer',\n 'Flight Attendant',\n 'Florist',\n 'Forensic Scientist',\n 'Fundraiser',\n 'Geologist',\n 'Graphic Designer',\n 'Hairdresser',\n 'Health Educator',\n 'Historian',\n 'Human Resources Manager',\n 'Industrial Designer',\n 'Industrial Engineer',\n 'Insurance Agent',\n 'Interior Designer',\n 'Interpreter',\n 'Investment Banker',\n 'IT Manager',\n 'Journalist',\n 'Judge',\n 'Landscape Architect',\n 'Lawyer',\n 'Librarian',\n 'Loan Officer',\n 'Logistician',\n 'Machine Operator',\n 'Makeup Artist',\n 'Management Consultant',\n 'Manufacturing Engineer',\n 'Marine Biologist',\n 'Market Research Analyst',\n 'Marketing Manager',\n 'Massage Therapist',\n 'Mathematician',\n 'Mechanical Engineer',\n 'Medical Assistant',\n 'Microbiologist',\n 'Musician',\n 'Network Administrator',\n 'Neurologist',\n 'Nuclear Engineer',\n 'Nurse',\n 'Nutritionist',\n 'Occupational Therapist',\n 'Optometrist',\n 'Paralegal',\n 'Paramedic',\n 'Park Ranger',\n 'Pediatrician',\n 'Pharmacist',\n 'Photographer',\n 'Physical Therapist',\n 'Physician',\n 'Physicist',\n 'Pilot',\n 'Plumber',\n 'Police Officer',\n 'Political Scientist',\n 'Producer',\n 'Product Manager',\n 'Professor',\n 'Project Manager',\n 'Psychiatrist',\n 'Psychologist',\n 'Public Relations Specialist',\n 'Quality Assurance Analyst',\n 'Radiologist',\n 'Real Estate Agent',\n 'Receptionist',\n 'Registered Nurse',\n 'Reporter',\n 'Research Scientist',\n 'Respiratory Therapist',\n 'Sales Manager',\n 'Social Worker',\n 'Software Developer',\n 'Software Engineer',\n 'Statistician',\n 'Surgeon',\n 'Surveyor',\n 'Systems Analyst',\n 'Teacher',\n 'Technical Writer',\n 'Urban Planner',\n 'Veterinarian',\n 'Web Developer',\n 'Writer',\n 'Zoologist'\n];\n"]}
1
+ {"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../../src/generator-data/words/jobs.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEC,QAAA,IAAI,GAAa;IAC5B,YAAY;IACZ,OAAO;IACP,SAAS;IACT,eAAe;IACf,qBAAqB;IACrB,oBAAoB;IACpB,wBAAwB;IACxB,wBAAwB;IACxB,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,cAAc;IACd,YAAY;IACZ,UAAU;IACV,aAAa;IACb,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,qBAAqB;IACrB,YAAY;IACZ,sBAAsB;IACtB,YAAY;IACZ,kBAAkB;IAClB,WAAW;IACX,cAAc;IACd,MAAM;IACN,mBAAmB;IACnB,SAAS;IACT,cAAc;IACd,gBAAgB;IAChB,uBAAuB;IACvB,OAAO;IACP,qBAAqB;IACrB,sBAAsB;IACtB,YAAY;IACZ,gBAAgB;IAChB,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,SAAS;IACT,cAAc;IACd,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oBAAoB;IACpB,mBAAmB;IACnB,cAAc;IACd,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,kBAAkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,QAAQ;IACR,WAAW;CACH,CAAC","sourcesContent":["// Copyright (c) 2026 Erik Fortune\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\n\nexport const jobs: string[] = [\n 'Accountant',\n 'Actor',\n 'Actuary',\n 'Administrator',\n 'Advertising Manager',\n 'Aerospace Engineer',\n 'Agricultural Scientist',\n 'Air Traffic Controller',\n 'Animator',\n 'Anthropologist',\n 'Archaeologist',\n 'Architect',\n 'Art Director',\n 'Astronomer',\n 'Attorney',\n 'Audiologist',\n 'Baker',\n 'Banker',\n 'Barber',\n 'Biologist',\n 'Biomedical Engineer',\n 'Bookkeeper',\n 'Broadcast Technician',\n 'Bus Driver',\n 'Business Analyst',\n 'Carpenter',\n 'Cartographer',\n 'Chef',\n 'Chemical Engineer',\n 'Chemist',\n 'Chiropractor',\n 'Civil Engineer',\n 'Clinical Psychologist',\n 'Coach',\n 'Computer Programmer',\n 'Construction Manager',\n 'Consultant',\n 'Content Writer',\n 'Copywriter',\n 'Counselor',\n 'Court Reporter',\n 'Curator',\n 'Data Analyst',\n 'Data Scientist',\n 'Database Administrator',\n 'Dental Hygienist',\n 'Dentist',\n 'Dermatologist',\n 'Dietitian',\n 'Director',\n 'Economist',\n 'Editor',\n 'Electrical Engineer',\n 'Electrician',\n 'Elementary School Teacher',\n 'Emergency Medical Technician',\n 'Engineer',\n 'Environmental Scientist',\n 'Epidemiologist',\n 'Event Planner',\n 'Fashion Designer',\n 'Film Director',\n 'Financial Advisor',\n 'Financial Analyst',\n 'Firefighter',\n 'Fitness Trainer',\n 'Flight Attendant',\n 'Florist',\n 'Forensic Scientist',\n 'Fundraiser',\n 'Geologist',\n 'Graphic Designer',\n 'Hairdresser',\n 'Health Educator',\n 'Historian',\n 'Human Resources Manager',\n 'Industrial Designer',\n 'Industrial Engineer',\n 'Insurance Agent',\n 'Interior Designer',\n 'Interpreter',\n 'Investment Banker',\n 'IT Manager',\n 'Journalist',\n 'Judge',\n 'Landscape Architect',\n 'Lawyer',\n 'Librarian',\n 'Loan Officer',\n 'Logistician',\n 'Machine Operator',\n 'Makeup Artist',\n 'Management Consultant',\n 'Manufacturing Engineer',\n 'Marine Biologist',\n 'Market Research Analyst',\n 'Marketing Manager',\n 'Massage Therapist',\n 'Mathematician',\n 'Mechanical Engineer',\n 'Medical Assistant',\n 'Microbiologist',\n 'Musician',\n 'Network Administrator',\n 'Neurologist',\n 'Nuclear Engineer',\n 'Nurse',\n 'Nutritionist',\n 'Occupational Therapist',\n 'Optometrist',\n 'Paralegal',\n 'Paramedic',\n 'Park Ranger',\n 'Pediatrician',\n 'Pharmacist',\n 'Photographer',\n 'Physical Therapist',\n 'Physician',\n 'Physicist',\n 'Pilot',\n 'Plumber',\n 'Police Officer',\n 'Political Scientist',\n 'Producer',\n 'Product Manager',\n 'Professor',\n 'Project Manager',\n 'Psychiatrist',\n 'Psychologist',\n 'Public Relations Specialist',\n 'Quality Assurance Analyst',\n 'Radiologist',\n 'Real Estate Agent',\n 'Receptionist',\n 'Registered Nurse',\n 'Reporter',\n 'Research Scientist',\n 'Respiratory Therapist',\n 'Sales Manager',\n 'Social Worker',\n 'Software Developer',\n 'Software Engineer',\n 'Statistician',\n 'Surgeon',\n 'Surveyor',\n 'Systems Analyst',\n 'Teacher',\n 'Technical Writer',\n 'Urban Planner',\n 'Veterinarian',\n 'Web Developer',\n 'Writer',\n 'Zoologist'\n] as const;\n"]}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@fgv/ts-random",
3
- "version": "5.1.0-27",
3
+ "version": "5.1.0-29",
4
4
  "description": "psedo-random number generator and utilities for TypeScript",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "author": "",
8
8
  "license": "MIT",
9
9
  "dependencies": {
10
- "@fgv/ts-utils": "5.1.0-27",
11
- "@fgv/ts-json-base": "5.1.0-27"
10
+ "@fgv/ts-utils": "5.1.0-29",
11
+ "@fgv/ts-json-base": "5.1.0-29"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@rushstack/heft": "1.2.7",
@@ -20,9 +20,9 @@
20
20
  "@rushstack/eslint-config": "4.6.4",
21
21
  "eslint": "^9.39.2",
22
22
  "typedoc": "~0.28.16",
23
- "@fgv/typedoc-compact-theme": "5.1.0-27",
24
- "@fgv/ts-utils-jest": "5.1.0-27",
25
- "@fgv/heft-dual-rig": "5.1.0-27"
23
+ "@fgv/heft-dual-rig": "5.1.0-29",
24
+ "@fgv/ts-utils-jest": "5.1.0-29",
25
+ "@fgv/typedoc-compact-theme": "5.1.0-29"
26
26
  },
27
27
  "repository": {
28
28
  "type": "git",