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.
\ No newline at end of file
diff --git a/snippets/byteSize.md b/snippets/byteSize.md
index f55fcb931..5693da1ab 100644
--- a/snippets/byteSize.md
+++ b/snippets/byteSize.md
@@ -9,6 +9,6 @@ const byteSize = str => new Blob([str]).size;
```
```js
-byteSize("😀"); // 4
-byteSize("Hello World"); // 11
+byteSize('😀'); // 4
+byteSize('Hello World'); // 11
```
diff --git a/tag_database b/tag_database
index f5633a5fa..27aeb2dfd 100644
--- a/tag_database
+++ b/tag_database
@@ -2,6 +2,7 @@ anagrams:string
arrayToHtmlList:browser
average:math
bottomVisible:browser
+byteSize:uncategorized
call:adapter
capitalize:string
capitalizeEveryWord:string