-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0efb00a
commit 1bb22a4
Showing
41 changed files
with
555 additions
and
299 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
const fii = require('./main.js') | ||
const { BrowserLevel } = require('browser-level') | ||
// import levelOptions from './options.js' | ||
import { Main as MainInvertedIndex } from './main.js' | ||
import { BrowserLevel } from 'browser-level' | ||
|
||
module.exports = ({ name = 'fii', ...ops }) => fii({ | ||
db: new BrowserLevel(name), | ||
...ops | ||
}) | ||
export class InvertedIndex { | ||
constructor(ops = {}) { | ||
return new MainInvertedIndex({ | ||
db: new BrowserLevel(ops.name || 'fii', { valueEncoding: 'json' }), | ||
...ops | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
const fii = require('./main.js') | ||
const { MemoryLevel } = require('memory-level') | ||
import levelOptions from './options.js' | ||
import { Main } from './main.js' | ||
import { ClassicLevel } from 'classic-level' | ||
|
||
module.exports = ({ name = 'fii', ...ops }) => fii({ | ||
db: new MemoryLevel(), | ||
...ops | ||
}) | ||
export class InvertedIndex { | ||
constructor(ops = {}) { | ||
return new Main({ | ||
db: new ClassicLevel(ops.name || 'fii', levelOptions), | ||
...ops | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const charwise = require('charwise') | ||
import charwise from 'charwise' | ||
|
||
module.exports = { | ||
export default { | ||
keyEncoding: charwise, | ||
valueEncoding: 'json' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.