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();