1.1.10 • Published 3 years ago

sematec-repository-pattern v1.1.10

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

Repository Package for building CRUD service

Features

This package enable to persists data in (Map, LocalStorage)

Map Functions

  • getById for retriveing one Item
  • add for adding one Item

Full examples

import { Entity, MapRepository } from "sematec-repository-pattern";

class Profile implements Entity<number>{
    constructor(
        public id: number,
        public fullName: string) { }
}

class ProfileMapRepository extends MapRepository<number, Profile>{

}


let repository = new ProfileMapRepository();
repository.add(new Profile(1, 'reza bardal'));
repository.add(new Profile(2, 'reza2 bardal2'));

let profile = repository.get(2);

console.log(profile);
1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago