mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add lock=on/off to /gen and /genraw commands
This commit is contained in:
@ -565,6 +565,24 @@ export function countOccurrences(string, character) {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string is "true" value.
|
||||
* @param {string} arg String to check
|
||||
* @returns {boolean} True if the string is true, false otherwise.
|
||||
*/
|
||||
export function isTrueBoolean(arg) {
|
||||
return ['on', 'true', '1'].includes(arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a string is "false" value.
|
||||
* @param {string} arg String to check
|
||||
* @returns {boolean} True if the string is false, false otherwise.
|
||||
*/
|
||||
export function isFalseBoolean(arg) {
|
||||
return ['off', 'false', '0'].includes(arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a number is odd.
|
||||
* @param {number} number The number to check.
|
||||
|
Reference in New Issue
Block a user