From 51e79d1fe90f9f13dbddec292a807dc1ad67ea9f Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Wed, 3 Jan 2018 18:58:01 +0100 Subject: [PATCH 1/2] responsive github ribbon --- docs/index.html | 2 +- static-parts/index-start.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.html b/docs/index.html index 645a1252f..569abb241 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. From a81584d0df0caaeeff6e5ff54cab080c946e763e Mon Sep 17 00:00:00 2001 From: Pl4gue Date: Wed, 3 Jan 2018 19:02:27 +0100 Subject: [PATCH 2/2] build --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 569abb241..c5e88732f 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 ]