diff --git a/README.md b/README.md index 4968bf09f..21036c904 100644 --- a/README.md +++ b/README.md @@ -427,7 +427,7 @@ average(1, 2, 3);
View contents -* [`stripHTMLtags`](#striphtmltags) +* [`stripHTMLTags`](#striphtmltags)
diff --git a/docs/index.html b/docs/index.html index 202787e70..d6289dbdd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,7 +50,7 @@ scrollToTop(); } }, false); - }

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

 

Adapter

ary

Creates a function that accepts up to n arguments, ignoring any additional arguments.

Call the provided function, fn, with up to n arguments, using Array.slice(0,n) and the spread operator (...).

const ary = (fn, n) => (...args) => fn(...args.slice(0, n));
+      }

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

 

Adapter

ary

Creates a function that accepts up to n arguments, ignoring any additional arguments.

Call the provided function, fn, with up to n arguments, using Array.slice(0,n) and the spread operator (...).

const ary = (fn, n) => (...args) => fn(...args.slice(0, n));
 
const firstTwoMax = ary(Math.max, 2);
 [[2, 6, 'a'], [8, 4, 6], [10]].map(x => firstTwoMax(...x)); // [6, 8, 10]
 

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);
diff --git a/tag_database b/tag_database
index 5cef0dae1..3db23ef05 100644
--- a/tag_database
+++ b/tag_database
@@ -215,7 +215,7 @@ sortedLastIndexBy:array,math,function
 splitLines:string
 spreadOver:adapter
 standardDeviation:math,array
-stripHTMLtags:uncategorized
+stripHTMLTags:uncategorized
 sum:math,array
 sumBy:math,array,function
 sumPower:math