Socket
Socket
Sign inDemoInstall

@anchan828/typeorm-decorators

Package Overview
Dependencies
3
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @anchan828/typeorm-decorators

[TypeORM](https://github.com/typeorm/typeorm) decorators


Version published
Weekly downloads
144
increased by157.14%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.0.100 (2024-03-17)

Note: Version bump only for package @anchan828/typeorm-helpers

Readme

Source

@anchan828/typeorm-decorators

npm NPM

Description

Decorator collection for TypeORM

Installation

$ npm i --save typeorm @anchan828/typeorm-decorators

Quick Start

@Entity()
class UlidColumnTest extends BaseEntity {
  @PrimaryGeneratedColumn()
  public id!: number;

  @UlidColumn()
  public ulid!: string;
}
@Entity()
class StaticFileColumnTest extends BaseEntity {
  @PrimaryGeneratedColumn()
  public id!: number;

  @StaticFileColumn({ dirname: "/path/to/" })
  public file!: BinaryLike;
}
@Entity()
class EncryptTransformerTest extends BaseEntity {
  @PrimaryGeneratedColumn()
  public id!: number;

  // key is createHash("sha256").update("test").digest("hex")
  @EncryptColumn({ key: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" })
  public password!: string;
}

License

MIT

FAQs

Last updated on 17 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc