]> git.ardis.lu - sleepy-operators/commitdiff
Add basic demo message
authorArdis Lu <ardisglu@gmail.com>
Tue, 10 Jan 2023 04:31:43 +0000 (20:31 -0800)
committerArdis Lu <ardisglu@gmail.com>
Tue, 10 Jan 2023 04:31:43 +0000 (20:31 -0800)
script.js

index 0601d28a74a696f90cb6cb5e14a156f9a9ef9d9f..58d68d15822aee9584fe5a672f5ae2cb0433ee33 100644 (file)
--- 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.'
+  });
+}
This page took 0.039955 seconds and 4 git commands to generate.