JS: camelCase changes

This commit is contained in:
Willy-JL
2024-10-16 01:55:00 +01:00
parent a85819f37e
commit c8b3bf1869
6 changed files with 15 additions and 15 deletions

View File

@@ -12,8 +12,8 @@ let searchStr = "World";
let result2 = toString(sampleText.indexOf(searchStr));
print(result2);
let upperCaseText = "Text in upper case: " + to_upper_case(sampleText);
let upperCaseText = "Text in upper case: " + toUpperCase(sampleText);
print(upperCaseText);
let lowerCaseText = "Text in lower case: " + to_lower_case(sampleText);
let lowerCaseText = "Text in lower case: " + toLowerCase(sampleText);
print(lowerCaseText);

View File

@@ -12,14 +12,14 @@ while (dialog.message("Interactive Console", result)) {
let input = keyboard.text(256);
if (!input) break;
let path = tmp_template + to_string(tmp_number++);
let path = tmp_template + toString(tmp_number++);
storage.write(path, "({run:function(){return " + input + ";},})");
result = load(path).run();
storage.remove(path);
// Must convert to string explicitly
if (typeof result === "number") {
result = to_string(result);
result = toString(result);
} else if (typeof result === "undefined") {
result = "undefined";
} else if (typeof result === "boolean") {

View File

@@ -337,9 +337,9 @@ static int32_t js_thread(void* arg) {
mjs_set(mjs, global, "toString", ~0, MJS_MK_FN(js_global_to_string));
mjs_set(mjs, global, "ffi_address", ~0, MJS_MK_FN(js_ffi_address));
mjs_set(mjs, global, "require", ~0, MJS_MK_FN(js_require));
mjs_set(mjs, global, "parse_int", ~0, MJS_MK_FN(js_parse_int));
mjs_set(mjs, global, "to_upper_case", ~0, MJS_MK_FN(js_to_upper_case));
mjs_set(mjs, global, "to_lower_case", ~0, MJS_MK_FN(js_to_lower_case));
mjs_set(mjs, global, "parseInt", ~0, MJS_MK_FN(js_parse_int));
mjs_set(mjs, global, "toUpperCase", ~0, MJS_MK_FN(js_to_upper_case));
mjs_set(mjs, global, "toLowerCase", ~0, MJS_MK_FN(js_to_lower_case));
mjs_val_t console_obj = mjs_mk_object(mjs);
mjs_set(mjs, console_obj, "log", ~0, MJS_MK_FN(js_console_log));

View File

@@ -144,10 +144,10 @@ static void js_vgm_destroy(void* inst) {
}
static const JsModuleDescriptor js_vgm_desc = {
name: "vgm",
create: js_vgm_create,
destroy: js_vgm_destroy,
api_interface: NULL,
"vgm",
js_vgm_create,
js_vgm_destroy,
NULL,
};
static const FlipperAppPluginDescriptor plugin_descriptor = {

View File

@@ -34,7 +34,7 @@ export type KeyCode = MainKey | ModifierKey | number;
* @brief Initializes the module
* @param settings USB device settings. Omit to select default parameters
*/
export declare function setup(settings?: { vid: number, pid: number, mfrName?: string, prodName?: string, layout_path: string }): void;
export declare function setup(settings?: { vid: number, pid: number, mfrName?: string, prodName?: string, layoutPath: string }): void;
/**
* @brief Tells whether the virtual USB HID device has successfully connected