Skip to content

Commit 6376958

Browse files
📚 docs: Update.
1 parent cb698ec commit 6376958

File tree

5 files changed

+30
-14
lines changed

5 files changed

+30
-14
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ User:Watchduck
1313
</p>
1414

1515
Permutation library for JavaScript.
16-
See [docs](https://computational-combinatorics.github.io/permutation).
16+
See [docs](https://computational-combinatorics.github.io/permutation/index.html).
1717
Parent is [js-algorithms](https://github.com/make-github-pseudonymous-again/js-algorithms).
1818

19+
> :warning: Depending on your environment, the code may require
20+
> `regeneratorRuntime` to be defined, for instance by importing
21+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
22+
1923
```js
2024
import { next , reversed , identity } from '@combinatorics/permutation' ;
2125
next( reversed( identity( 3 ) ) ) ; // [ 0 , 1 , 2 ]

doc/manual/example.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Example
1+
# Examples
2+
3+
> More examples in [the test files](https://github.com/computational-combinatorics/permutation/tree/main/test/src).
24
35
```js
46
import {

doc/manual/installation.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
# Installation
22

33
Can be managed using
4-
[jspm](http://jspm.io)
5-
or [npm](https://github.com/npm/npm).
4+
[yarn](https://yarnpkg.com/en/docs),
5+
[npm](https://docs.npmjs.com),
6+
or [jspm](https://jspm.org/docs).
67

7-
### jspm
8+
9+
### yarn
810
```terminal
9-
jspm install npm:@combinatorics/permutation
11+
yarn add @combinatorics/permutation
1012
```
1113

1214
### npm
1315
```terminal
1416
npm install @combinatorics/permutation --save
1517
```
18+
19+
### jspm
20+
```terminal
21+
jspm install npm:@combinatorics/permutation
22+
```

doc/manual/usage.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Usage
22

3-
The code needs a ES2015+ polyfill to work, for example
4-
[regenerator-runtime/runtime](https://babeljs.io/docs/usage/polyfill).
3+
> :warning: Depending on your environment, the code may require
4+
> `regeneratorRuntime` to be defined, for instance by importing
5+
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
6+
7+
First, require the polyfill at the entry point of your application
58
```js
6-
await import( 'regenerator-runtime/runtime.js' ) ;
9+
await import('regenerator-runtime/runtime.js');
710
// or
8-
import 'regenerator-runtime/runtime.js' ;
11+
import 'regenerator-runtime/runtime.js';
912
```
1013

11-
Then
14+
Then, import the library where needed
1215
```js
13-
const permutation = await import( '@combinatorics/permutation' ) ;
16+
const permutation = await import('@combinatorics/permutation');
1417
// or
15-
import * as permutation from '@combinatorics/permutation' ;
18+
import * as permutation from '@combinatorics/permutation';
1619
```

doc/scripts/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const domReady = function (callback) {
1010
domReady(() => {
1111
const projectname = document.createElement('a');
1212
projectname.classList.add('project-name');
13-
projectname.text = 'combinatorics/permutation';
13+
projectname.text = '@combinatorics/permutation';
1414
projectname.href = './index.html';
1515

1616
const header = document.querySelector('header');

0 commit comments

Comments
 (0)