From: Ardis Lu Date: Tue, 10 Jan 2023 04:31:43 +0000 (-0800) Subject: Add basic demo message X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=c16b34adff87fbe7ef4bd628001a19a9287aa570;p=sleepy-operators Add basic demo message --- diff --git a/script.js b/script.js index 0601d28..58d68d1 100644 --- a/script.js +++ b/script.js @@ -1,5 +1,7 @@ import * as sleepy from '/sleepy-operators.js'; +globalThis.sleepy = sleepy; + const ascii = ` _ | | @@ -16,11 +18,17 @@ const ascii = | | |_|`; -function help() { +globalThis.help = function help() { console.log(`%c ${ascii}`, 'font-weight: bold'); - // TODO: print a helpful demo message + console.log('🥱 Hello! Type functions() to display all the sleepy-operators.'); } -globalThis.help = help; help(); -globalThis.sleepy = sleepy; +globalThis.functions = function functions() { + console.table({ + 'help()': 'Print the introduction message.', + 'functions()': 'Print all the sleepy-operators.', + 'sleepy.sort(number[])': 'Sleepily sort an array of numbers.', + 'sleepy.sum(number[])': 'Sleepily sum together an array of numbers.' + }); +}