Skip to content

Commit

Permalink
Fixing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomguithereal committed Jan 10, 2024
1 parent fdbeb3b commit 0d69bc6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 312 deletions.
305 changes: 0 additions & 305 deletions composite-index.md

This file was deleted.

4 changes: 2 additions & 2 deletions passjoin-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ But, even if this works with few terms, it will soon become hard to compute if t
A `PassjoinIndex` solves this problem by indexing the list of terms such as it becomes efficient to query them:

```js
const tree = PassjoinIndex.from(terms, levenshtein, 2);
const index = PassjoinIndex.from(terms, levenshtein, 2);

// We can now search the index easily:
const suggestions = tree.search(query);
const suggestions = index.search(query);
```


Expand Down
4 changes: 2 additions & 2 deletions queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This just means that inserted items will get out in their insertion order.

For more information about the Queue, you can head [here](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)).

If you know the maximum number of items your queue will need to store, you should check the [`CircularBuffer`]({{ site.baseurl }}/circular-buffer) structure for better performance.
If you know the maximum number of items your queue will need to store, you should check the [`CircularBuffer`]({{ site.baseurl }}/circular-buffer) structure for better performance.

```js
const Queue = require('mnemonist/queue');
Expand Down Expand Up @@ -42,7 +42,7 @@ The `Queue` takes no argument.
Alternatively, one can build a `Queue` from an arbitrary JavaScript iterable likewise:

```js
const list = Queue.from([1, 2, 3]);
const queue = Queue.from([1, 2, 3]);
```

### Static #.of
Expand Down
3 changes: 2 additions & 1 deletion trie-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The `TrieMap` optionally takes as single argument the type of sequence you are g
// For a trie containing string prefixes
const trie = new TrieMap();
```

```js
// For a trie containing arbitrary sequences fed as arrays
const trie = new TrieMap(Array);
Expand All @@ -27,7 +28,7 @@ const trie = new TrieMap(Array);
Alternatively, one can build a `TrieMap` from an arbitrary JavaScript iterable likewise:

```js
const list = TrieMap.from({
const trie = TrieMap.from({
roman: 1,
romanesque: 2
});
Expand Down
5 changes: 3 additions & 2 deletions trie.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ const wordsWithMatchingPrefix = trie.find(query);

The `Trie` optionally takes as single argument the type of sequence you are going to feed it.

```
```js
// For a trie containing string prefixes
const trie = new Trie();
```

```js
// For a trie containing arbitrary sequences fed as arrays
const trie = new Trie(Array);
Expand All @@ -64,7 +65,7 @@ const trie = new Trie(Array);
Alternatively, one can build a `Trie` from an arbitrary JavaScript iterable likewise:

```js
const list = Trie.from(['roman', 'romanesque']);
const trie = Trie.from(['roman', 'romanesque']);
```

## Members
Expand Down

0 comments on commit 0d69bc6

Please sign in to comment.