From fe05c389d993afe78a8c79db3fab5c31600d5da3 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Wed, 3 Jan 2018 19:40:57 +0200 Subject: [PATCH] Updated rendering on website --- docs/index.html | 4 ++-- static-parts/index-start.html | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/index.html b/docs/index.html index 246df7598..645a1252f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -30 seconds of code

 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 0b3421b96..fd7122025 100644
--- a/static-parts/index-start.html
+++ b/static-parts/index-start.html
@@ -2,14 +2,6 @@
 
   
     
-    
-    
     30 seconds of code
     
     
@@ -81,6 +73,14 @@
     
   
   
+    
+    
     
     

 30 seconds of code