bool_setting.ts (392B)
1 2 import * as nostr from './nostr' 3 4 var setting = "mny`or" 5 var new_setting = "" 6 7 for (let i = 0; i < setting.length; i++) { 8 new_setting += String.fromCharCode(setting.charCodeAt(i) + 1); 9 } 10 11 // this should fail 12 if (nostr.set_bool_setting("shmorg", true)) { 13 // you shouldn't be able to set settings that dont exist 14 return 0; 15 } 16 17 if (!nostr.set_bool_setting(new_setting, false)) { 18 return 0; 19 }