0.8.0-alpha.1 • Published 3 years ago

@storagestack/indexer-middleware v0.8.0-alpha.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@storagestack/indexer-middleware

Create a private index on top of your data.

Usage

const indexerMiddleware = require('@storagestack/indexer-middleware');

const nameToId = (name: string) => {
    return name;
};
const transformation = (name: string, t: Blog) => {
    const transformed = {lastUpdated: new Date(),
            favorite: false,
            title: t.title,
            path: name};
            return transformed;
};
this.indexerMiddleware = new IndexerMiddleware(transformation, nameToId, 'blog-index.json');

ss.use('blog-*', this.indexerMiddleware);

When you want to listen to updates on the index you can use the following statement.

this.indexerMiddleware.listen = (index: HashTableIndex<TutrSum>) => console.log('new index', index);
0.8.0-alpha.1

3 years ago

0.8.0-alpha.0

3 years ago

0.7.17

3 years ago

0.7.10

3 years ago

0.7.9

3 years ago

0.7.5

3 years ago

0.7.4

3 years ago

0.7.2

3 years ago

0.7.3

3 years ago

0.7.1

3 years ago

0.7.0

3 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.15

4 years ago

0.4.16

4 years ago

0.4.14

4 years ago

0.4.13

4 years ago