0.0.2 • Published 6 years ago

und-base-entity v0.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Build Status

Coverage Status

Base Entity

This module helps us reduce our code as it avoids the use of setters and getters. It also implements the concept of introspection.

Installation

npm install und-base-entity --save

or

yarn add und-base-entity

Usage

import { BaseEntity } from "und-base-entity";
import { attribute } from "und-base-entity";

class TestEntity extends BaseEntity {
  @attribute(true, () => {
    return "default";
  })
  private firstName: string;

  @attribute(true)
  private lastName: string;

  public getFirstName(): string {
    return this.firstName;
  }

  public getLastName(): string {
    return this.lastName;
  }
}

Test

npm run test

or

yarn test

Lint

npm run lint

or

yarn lint
0.0.2

6 years ago

0.0.1

6 years ago

1.0.0

6 years ago