From c16b34adff87fbe7ef4bd628001a19a9287aa570 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Mon, 9 Jan 2023 20:31:43 -0800 Subject: [PATCH] Add basic demo message --- script.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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.' + }); +} -- 2.47.3