diff --git a/README.md b/README.md index 61a3631..0127d4b 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,15 @@ [@collection-abstraction/set](https://collection-abstraction.github.io/set) == -Python's set data structure for JavaScript. Parent is +Python's set data structure for JavaScript. +See [docs](https://collection-abstraction.github.io/set/index.html). +Parent is [js-data-structures](https://github.com/make-github-pseudonymous-again/js-data-structures). +> :warning: Depending on your environment, the code may require +> `regeneratorRuntime` to be defined, for instance by importing +> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime). + ```js set('abc').issubset( 'abcd' ) ; // true ``` diff --git a/doc/css/style.css b/doc/css/style.css index a951e42..ed56934 100644 --- a/doc/css/style.css +++ b/doc/css/style.css @@ -1,7 +1,3 @@ -/*header > a[data-ice="testLink"] {*/ - /*display: none;*/ -/*}*/ - h1, h2, .navigation, @@ -50,7 +46,6 @@ footer background-color: #ccc; } - span[data-ice="signature"] > span { /*font-weight: bold;*/ font-style: italic; diff --git a/doc/manual/installation.md b/doc/manual/installation.md index 1d22cb6..7825192 100644 --- a/doc/manual/installation.md +++ b/doc/manual/installation.md @@ -1,14 +1,22 @@ # Installation + Can be managed using -[jspm](http://jspm.io) -or [npm](https://github.com/npm/npm). +[yarn](https://yarnpkg.com/en/docs), +[npm](https://docs.npmjs.com), +or [jspm](https://jspm.org/docs). -### jspm + +### yarn ```terminal -jspm install npm:@collection-abstraction/set +yarn add @collection-abstraction/set ``` ### npm ```terminal npm install @collection-abstraction/set --save ``` + +### jspm +```terminal +jspm install npm:@collection-abstraction/set +``` diff --git a/doc/manual/usage.md b/doc/manual/usage.md index 1330eee..698421b 100644 --- a/doc/manual/usage.md +++ b/doc/manual/usage.md @@ -1,15 +1,19 @@ # Usage -The code needs a ES2015+ polyfill to work, for example -[regenerator-runtime/runtime](https://babeljs.io/docs/usage/polyfill). + +> :warning: Depending on your environment, the code may require +> `regeneratorRuntime` to be defined, for instance by importing +> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime). + +First, require the polyfill at the entry point of your application ```js -await import( 'regenerator-runtime/runtime.js' ) ; +await import('regenerator-runtime/runtime.js'); // or -import 'regenerator-runtime/runtime.js' ; +import 'regenerator-runtime/runtime.js'; ``` -Then +Then, import the library where needed ```js -const number = await import( '@collection-abstraction/set' ) ; +const {set} = await import('@collection-abstraction/set'); // or -import number from '@collection-abstraction/set' ; +import {set} from '@collection-abstraction/set'; ``` diff --git a/doc/scripts/header.js b/doc/scripts/header.js index d4537ec..0488334 100644 --- a/doc/scripts/header.js +++ b/doc/scripts/header.js @@ -7,10 +7,10 @@ const domReady = function (callback) { } }; -domReady(function () { +domReady(() => { const projectname = document.createElement('a'); projectname.classList.add('project-name'); - projectname.text = 'collection-abstraction/set'; + projectname.text = '@collection-abstraction/set'; projectname.href = './index.html'; const header = document.querySelector('header'); @@ -24,7 +24,7 @@ domReady(function () { const input = document.querySelector('.search-input'); // Active search box when focus on searchBox. - input.addEventListener('focus', function () { + input.addEventListener('focus', () => { searchBox.classList.add('active'); }); });