diff --git a/docs/adapter.html b/docs/adapter.html index 17834702a..723ecf808 100644 --- a/docs/adapter.html +++ b/docs/adapter.html @@ -1,4 +1,4 @@ -
Curated collection of useful JavaScript snippets
that you can understand in 30 seconds or less.
295
snippets
113
contributors
3080
commits
19491
stars
The core goal of 30 seconds of code is to provide a quality resource for beginner and advanced JavaScript developers alike. We want to help improve the JavaScript ecosystem, by lowering the barrier of entry for newcomers and help seasoned veterans pick up new tricks and remember old ones. In order to achieve this, we have collected hundreds of snippets that can be of use in a wide range of situations. We welcome new contributors and we like fresh ideas, as long as the code is short and easy to grasp in about 30 seconds. The only catch, if you may, is that many of our snippets are not perfectly suited for large, enterprise applications and they might not be deemed production-ready.
In order for 30 seconds of code to be as accessible and useful as possible, all of the snippets in the collection are licensed under the CC0-1.0 License, meaning they are absolutely free to use in any project you like. If you like what we do, you can always credit us, but that is not mandatory.
Our sophisticated robot helpers pick new snippets from our collection daily, so that you can discover new snippets to enhance your projects:
Performs right-to-left function composition.
Use Array.reduce() to perform right-to-left function composition. The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.
const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args))); +30 seconds of code
30 seconds of code
Curated collection of useful JavaScript snippets
that you can understand in 30 seconds or less.295
snippets113
contributors3080
commits19491
starsOur philosophy
The core goal of 30 seconds of code is to provide a quality resource for beginner and advanced JavaScript developers alike. We want to help improve the JavaScript ecosystem, by lowering the barrier of entry for newcomers and help seasoned veterans pick up new tricks and remember old ones. In order to achieve this, we have collected hundreds of snippets that can be of use in a wide range of situations. We welcome new contributors and we like fresh ideas, as long as the code is short and easy to grasp in about 30 seconds. The only catch, if you may, is that many of our snippets are not perfectly suited for large, enterprise applications and they might not be deemed production-ready.
In order for 30 seconds of code to be as accessible and useful as possible, all of the snippets in the collection are licensed under the CC0-1.0 License, meaning they are absolutely free to use in any project you like. If you like what we do, you can always credit us, but that is not mandatory.
Today's picks
Our sophisticated robot helpers pick new snippets from our collection daily, so that you can discover new snippets to enhance your projects:
compose
Performs right-to-left function composition.
Use
Array.reduce()to perform right-to-left function composition. The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.const compose = (...fns) => fns.reduce((f, g) => (...args) => f(g(...args)));const add5 = x => x + 5; const multiply = (x, y) => x * y; const multiplyAndAdd5 = compose(add5, multiply); diff --git a/docs/math.html b/docs/math.html index 553b92898..ff6276ebe 100644 --- a/docs/math.html +++ b/docs/math.html @@ -1,4 +1,4 @@ -Math - 30 seconds of code Math - 30 seconds of code Node - 30 seconds of code Node - 30 seconds of code Object - 30 seconds of code Object - 30 seconds of code String - 30 seconds of code String - 30 seconds of code Type - 30 seconds of code Type - 30 seconds of code Utility - 30 seconds of code Utility - 30 seconds of code