Skip to content

Commit

Permalink
Create unsandbox-maker-ideas.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnole25 authored Jan 13, 2024
1 parent e94df5d commit 006706b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions unsandbox-maker-ideas.txt
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

0 comments on commit 006706b

Please sign in to comment.