![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@dicelette/core
Advanced tools
The core module for Dicelette, contains :
The two are used in the bot and documentation.
"+" | "-" | "*" | "/" | "%" | "^" | "**";
{ [name: string]: { combination?: string; max?: number; min?: number; } }
:
string
: The name of the statisticstring
: A combination between multiple/other statistic, formula... (ex: constitution+2
). Can't coexist with min & max.number
: The maximum value of the statisticnumber
: The minimum value of the statistic"<"
| ">"
| ">="
| "<="
| "="
| "!="
| "=="
number
Optional
failure: number
Optional
success: number
number
Optional
comment: string
Optional
compare: Compare
string
Optional
modifier: Modifier
string
diceType: "1d20+{{$}}>=20"
The dice throw will be 1d20 + statistique that must be less than 20
diceType: "1d20<=$"
The dice throw will be 1d20 that must be less than the statistic
Optional
charName: boolean
Allow to force the user to choose a name for them characters
Optional
critical: Critical
How the success/echec will be done
Optional
damage: { [name: string]: string }
Special dice for damage
Optional
diceType: string
A die type in the notation supported by the bot. See documentation for syntaxe.
Optional
statistics: Statistic
Optional
total: number
A total can be set, it allows to calculate the total value of a future register member
If the sum of the value > total, the bot will send a message to the user to inform him that the total is exceeded and an error will be thrown
Note: Statistic that have a formula will be ignored from the total
const
COMMENT_REGEX: RegExp
sign
, value
, total
): number
Evaluate a formula and replace "^" by "**" if any
Name | Type |
---|---|
sign | Sign |
value | number |
total | number |
dice
): Resultat
| undefined
Parse the string provided and turn it as a readable dice for dice parser
Name | Type | Description |
---|---|---|
dice | string | {string} |
dice
): string
Replace the ++ +- -- by their proper value:
++
= +
+-
= -
--
= +
Name | Type | Description |
---|---|---|
dice | string | {string} |
string
): string
Escape regex string
Name | Type | Description |
---|---|---|
string | string | {string} |
originalDice
, stats?
): string
Replace the stat name by their value using stat and after evaluate any formula using replaceFormulaInDice
Name | Type | Description |
---|---|---|
originalDice | string | {dice} |
stats? | Object | {[name: string]: number} |
dice
, stats
): string
Replace the {{}} in the dice string and evaluate the interior if any
Name | Type | Description |
---|---|---|
dice | string | {string} |
value
, template
): string
Generate a random dice and remove the formula (+ evaluate it) Used for diceDamage only
Name | Type | Description |
---|---|---|
value | string | {string} |
template | StatisticalTemplate | {StatisticalTemplate} |
dice
, template
): string
Name | Type | Description |
---|---|---|
dice | string | {string} |
template | StatisticalTemplate | {StatisticalTemplate} |
combination
, stats
): Object
Random the combination and evaluate it to check if everything is valid
Name | Type | Description |
---|---|---|
combination | Object | {[name: string]: string} |
stats | Object | {[name: string]: string|number} |
combination
, stats
): any
Evaluate one selected combination
Name | Type | Description |
---|---|---|
combination | string | {string} |
stats | Object | {[name: string]: string|number} |
testDice
, stats?
): string
Verify if the provided dice work with random value
Name | Type | Description |
---|---|---|
testDice | string | {string} |
stats? | Object | {[name: string]: number} |
total?
, max?
, min?
): number
Name | Type | Default value |
---|---|---|
total | undefined | number | 100 |
max? | number | undefined |
min? | number | undefined |
template
): void
Test all combination with generated random value
Name | Type |
---|---|
template | StatisticalTemplate |
template
): void
Test each damage roll from the template.damage
Name | Type |
---|---|
template | StatisticalTemplate |
template
): StatisticalTemplate
Parse the provided JSON and verify each field to check if everything could work when rolling
Name | Type |
---|---|
template | any |
FAQs
Core library for the Dicelette Discord bot
The npm package @dicelette/core receives a total of 40 weekly downloads. As such, @dicelette/core popularity was classified as not popular.
We found that @dicelette/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.