Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@buka/class-transformer-extra

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buka/class-transformer-extra

class-transformer-extra contains methods that's aren't included in the class-transform package.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.7K
increased by14884.48%
Maintainers
1
Weekly downloads
 
Created
Source

@buka/class-transformer-extra

version downloads dependencies license Codecov

@buka/class-transformer-extra contains methods that's aren't included in the class-transformer package.

Install

npm install @buka/class-transformer-extra class-transformer
# OR
yarn install @buka/class-transformer-extra class-transformer
# OR
pnpm install @buka/class-transformer-extra class-transformer

Usage

String

methodbefore transformerafter transformer
@Split(",")"a,b,c"["a", "b", "c"]
@Trim()" abc ""abc"
@ToString()123"123"
@ToLowerCase()"ABC""abc"
@ToUpperCase()"abc""ABC"
@Replace("-", "_")"a-b-c""a_b_c"

Date

methodbefore transformerafter transformer
@ToDate()"2024-01-01"new Date("2024-01-01")
@FormatDate("YYYY/MM/DD")"2024-01-01""2024/01/01"

Number

methodbefore transformerafter transformer
@ToNumber()"123"123
@ToBigInt()"123"123n

Boolean

methodbefore transformerafter transformer
@ToBoolean()1true

Array

methodbefore transformerafter transformer
@Filter((num: number) => num > 3)[1,2,3.4,5][4,5]
@Flatten()[1, [2, [3, 4, [5]]]][1,2,3,4,5]
@Uniq()[1,1,2,3,4,4,5][1,2,3,4,5]
@UniqBy(Math.abs)[-1, 1, 2, 3, -3][-1, 2, 3]

Contribute

If you want to report bug or add new decorators, please submit an Issue or Pull Request.

Keywords

FAQs

Package last updated on 08 Jan 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc