JSPM

nestjs-sharp

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 193
  • Score
    100M100P100Q83212F
  • License MIT

Nest - modern, fast, powerful node.js web framework (@sharp)

Package Exports

  • nestjs-sharp
  • nestjs-sharp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nestjs-sharp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NestJs Sharp

Very thin Layer to be able to import sharp as Module / inject sharp as Service in NestJs Applications.

How to use

npm i nestjs-sharp

Import SharpModule in the Module you want to use it in:

@Module({
  imports: [SharpModule],
})
export class SomeModule {}

Inject SharpService into your Controller's or Service's constructor:

export class SomeServiceOrController {
  constructor(
    private sharpService: SharpService,
  ) {}

Use the edit method of the SharpService like the sharp function, more info: https://github.com/lovell/sharp, for example:

this.sharpService.edit(inputBuffer).rotate().toBuffer();