1.0.9 • Published 7 months ago

di-factory v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

di-factory

The generic repository pattern implementation for NodeJS, aka BaseCRUD

Usage

import { factory } from 'di-factory';

const Basecrud = factory(
  class {
    constructor(public name: string, public collectionId: string) {}
    
    getName = () => this.name;

    getCollectionId = () => this.collectionId;
  }
);

class TestCrud extends Basecrud("test-crud", "collection-uuid") {}

const testCrud = new TestCrud();

console.log(testCrud.getName()); // test-crud

See also

If you looking for integrated DI container for basecrud services instantiation, take a look on di-kit npm package

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago

0.0.1

7 months ago