1.2.2 • Published 10 months ago

@mapreedev/entity v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

@mapreedev/entity

Usage

import { BaseEntity } from "@mapreedev/entity";

type IExampleEntityCache = {
	username: string;
	id: string;
	hasPassword?: boolean;
}

type IExampleEntityDatabase = {
	username: string;
	id: string;
	password?: string;
}

const exampleEntity = new BaseEntity<IExampleEntityCache,IExampleEntityDatabase>({
	processor({ password, ...entity }){
		return{
			hasPassword: !!password,
			...entity,
		}
	}
})

// Now just use the entity with the methods provided

Rework

  • ACID
  • Prisma like methods
  • CRUD on Indexes
  • Custom errors
  • Optional database repository too
  • L3 Constructor for configure
1.2.2

10 months ago

1.2.0

10 months ago

1.2.1

10 months ago

1.1.1

12 months ago

1.0.0-1

1 year ago

1.0.0-0

1 year ago

1.0.0-2

1 year ago

1.1.1-2

12 months ago

1.1.1-1

12 months ago

1.1.1-0

12 months ago

1.1.0-0

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago