Merge pull request #477 from Chalarangelo/atomiks-patch-2
Add CDN + Browser usage of package
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
[](https://github.com/Chalarangelo/30-seconds-of-code/blob/master/LICENSE) [](https://gitter.im/30-seconds-of-code/Lobby) [](http://makeapullrequest.com) [](https://travis-ci.org/Chalarangelo/30-seconds-of-code) [](https://insight.io/github.com/Chalarangelo/30-seconds-of-code/tree/master/?source=0) [](https://github.com/Flet/semistandard) [](https://www.producthunt.com/posts/30-seconds-of-code)
|
[](https://github.com/Chalarangelo/30-seconds-of-code/blob/master/LICENSE) [](https://gitter.im/30-seconds-of-code/Lobby) [](http://makeapullrequest.com) [](https://travis-ci.org/Chalarangelo/30-seconds-of-code) [](https://insight.io/github.com/Chalarangelo/30-seconds-of-code/tree/master/?source=0) [](https://github.com/Flet/semistandard) [](https://www.producthunt.com/posts/30-seconds-of-code)
|
||||||
|
|
||||||
|
|
||||||
> Curated collection of useful Javascript snippets that you can understand in 30 seconds or less.
|
> Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.
|
||||||
|
|
||||||
|
|
||||||
- Use <kbd>Ctrl</kbd> + <kbd>F</kbd> or <kbd>command</kbd> + <kbd>F</kbd> to search for a snippet.
|
- Use <kbd>Ctrl</kbd> + <kbd>F</kbd> or <kbd>command</kbd> + <kbd>F</kbd> to search for a snippet.
|
||||||
@ -16,17 +16,32 @@
|
|||||||
|
|
||||||
#### Package
|
#### Package
|
||||||
|
|
||||||
|
⚠️ **WARNING:** Snippets are not production ready.
|
||||||
|
|
||||||
You can find a package with all the snippets on [npm](https://www.npmjs.com/package/30-seconds-of-code).
|
You can find a package with all the snippets on [npm](https://www.npmjs.com/package/30-seconds-of-code).
|
||||||
|
|
||||||
```
|
```
|
||||||
npm install 30-seconds-of-code
|
npm install 30-seconds-of-code
|
||||||
```
|
```
|
||||||
|
|
||||||
⚠️ **WARNING:** Snippets are not production ready.
|
CDN links
|
||||||
|
- [ES2017 Full (UMD)](https://unpkg.com/30-seconds-of-code)
|
||||||
|
- [ES5 Minified (UMD)](https://unpkg.com/30-seconds-of-code/dist/_30s.es5.min.js)
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|
||||||
To import the whole module:
|
**Browser**
|
||||||
|
|
||||||
|
> IMPORTANT: replace the `src` with the full version link and desired target spec (such as ES5 minified)):
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="https://unpkg.com/30-seconds-of-code"></script>
|
||||||
|
<script>
|
||||||
|
_30s.average(1, 2, 3);
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
|
||||||
|
**Node**
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// CommonJS
|
// CommonJS
|
||||||
|
|||||||
Reference in New Issue
Block a user