From 7d63390534085f355ca2d8dca4fed33938d11f85 Mon Sep 17 00:00:00 2001 From: Matt Brockman Date: Thu, 14 Jan 2021 16:02:24 -0800 Subject: [PATCH] toy example of show text length --- examples/showTextLength.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/showTextLength.js diff --git a/examples/showTextLength.js b/examples/showTextLength.js new file mode 100644 index 0000000..286abfa --- /dev/null +++ b/examples/showTextLength.js @@ -0,0 +1,13 @@ + +// Checkout the repo examples to get an idea of other ways you can use scripting +// https://github.com/latitudegames/Scripting/blob/master/examples + +const modifier = (text) => { + + state.displayStats = [{key:'Text Length', value: text.length, color: 'red'}] + + return { text } +} + +// Don't modify this part +modifier(text)