diff --git a/docs/index.html b/docs/index.html index b75d36899..9738ffe5a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -53,7 +53,7 @@ document.body.removeChild(textArea); } }, false); - }

 30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.

 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

Use a closure to call a stored key with stored arguments.

const call = (key, ...args) => context => context[key](...args);
+      }

 30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.

 

Adapter

call

Given a key and a set of arguments, call them when given a context. Primarily useful in composition.

Use a closure to call a stored key with stored arguments.

const call = (key, ...args) => context => context[key](...args);
 
Promise.resolve([1, 2, 3])
   .then(call('map', x => 2 * x))
   .then(console.log); //[ 2, 4, 6 ]
diff --git a/static-parts/index-start.html b/static-parts/index-start.html
index fd7122025..b46cd2dee 100644
--- a/static-parts/index-start.html
+++ b/static-parts/index-start.html
@@ -81,7 +81,7 @@
         }
       });
     
-    
+    
     

 30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.