-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Need a few ideas to create your custom block? Here's some cheat sheet arguments to help, and (hopefully) inspire you. | ||
This list will probably be updated later. | ||
|
||
If Else Reporter (AKA: Ternary Operator) | ||
args.D ? args.A : args.B | ||
|
||
Letters A to B of String | ||
String(args.C).substring(args.A - 1, args.B) | ||
|
||
Clamp Value | ||
args.A <= args.B ? args.B : args.A >= args.C ? args.C : args.A | ||
|
||
Replace Substrings | ||
args.C.toString().replace(new RegExp(args.A, "gi"), args.B) | ||
|
||
Repeat String | ||
String(args.A).repeat(args.B) | ||
|
||
Number to Unicode | ||
String.fromCharCode(args.A) | ||
|
||
Strictly Contains | ||
String(args.A).includes(String(args.B)) | ||
|
||
Reverse Text | ||
String(args.A).split("").reverse().join("") | ||
|
||
Triple Join | ||
String(args.A).concat(String(args.B).concat(String(args.C))) | ||
|
||
Percent Chance | ||
Math.random() < args.A / 100 |