mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +00:00
smaller nostrscript
This commit is contained in:
parent
30e33a01c1
commit
3d0448a929
@ -1,18 +1,19 @@
|
||||
|
||||
import * as nostr from './nostr'
|
||||
|
||||
export function go(): i32 {
|
||||
var setting = "mny`or"
|
||||
var new_setting = ""
|
||||
for (let i = 0; i < setting.length; i++) {
|
||||
var setting = "mny`or"
|
||||
var new_setting = ""
|
||||
|
||||
for (let i = 0; i < setting.length; i++) {
|
||||
new_setting += String.fromCharCode(setting.charCodeAt(i) + 1);
|
||||
}
|
||||
// this should fail
|
||||
if (nostr.set_bool_setting("shmorg", true)) {
|
||||
// you shouldn't be able to set settings that dont exist
|
||||
return 0;
|
||||
}
|
||||
return nostr.set_bool_setting(new_setting, false)
|
||||
}
|
||||
|
||||
go()
|
||||
// this should fail
|
||||
if (nostr.set_bool_setting("shmorg", true)) {
|
||||
// you shouldn't be able to set settings that dont exist
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!nostr.set_bool_setting(new_setting, false)) {
|
||||
return 0;
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user