@autheur/generator
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -22,2 +22,5 @@ import { Gender, DeterminantType } from '@autheur/datasets'; | ||
}; | ||
nextWordConfig: ({ | ||
word?: string; | ||
} & SpacerConfig) | null; | ||
}) => Omit<GeneratedConfig, 'form'>; | ||
@@ -48,4 +51,6 @@ }; | ||
declare const oneOf: (words: string[]) => Generator; | ||
declare function nounPhrase(): Generator[]; | ||
export { adjective, adverb, comma, determinant, generate, noun, nounPhrase, word }; | ||
export { adjective, adverb, comma, determinant, generate, noun, nounPhrase, oneOf, word }; |
{ | ||
"name": "@autheur/generator", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Random french sentence generator", | ||
@@ -37,3 +37,3 @@ "funding": "https://github.com/sponsors/CorentinTh", | ||
"dependencies": { | ||
"@autheur/datasets": "^1.0.2", | ||
"@autheur/datasets": "^1.0.3", | ||
"@autheur/operators": "^1.0.0", | ||
@@ -40,0 +40,0 @@ "defu": "^6.0.0" |
@@ -107,2 +107,12 @@ # @autheur/generator | ||
### `oneOf` | ||
Get a random word/sentence from a list that you specify. | ||
```typescript | ||
import { generate, oneOf } from '@autheur/generator'; | ||
generate([oneOf(['foobar', 'yolo'])]); // yolo | ||
``` | ||
## Other packages | ||
@@ -109,0 +119,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15881
284
134
Updated@autheur/datasets@^1.0.3