
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@types/koa-compress
Advanced tools
npm install --save @types/koa-compress
This package contains type definitions for koa-compress (https://github.com/koajs/compress).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-compress.
// Type definitions for koa-compress v4.x
// Project: https://github.com/koajs/compress
// Definitions by: Jerry Chin <https://github.com/hellopao>
// Joel Gallant <https://github.com/joelgallant>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/* =================== USAGE ===================
import compress = require("koa-compress");
var Koa = require('koa');
var app = new Koa();
app.use(compress());
=============================================== */
/// <reference types="node" />
/// <reference types="koa" />
import * as Koa from "koa";
import * as zlib from "zlib";
/**
* Compress middleware for Koa
*/
declare function koaCompress(options?: koaCompress.CompressOptions): Koa.Middleware;
declare namespace koaCompress {
export interface CompressOptions {
/**
* An optional function that checks the response content type to decide whether to compress. By default, it uses compressible.
*/
filter?: ((mimeType: string) => boolean) | undefined;
/**
* Minimum response size in bytes to compress. Default 1024 bytes or 1kb.
*/
threshold?: number | string | undefined;
/**
* An optional string, which specifies what encoders to use for requests
* without Accept-Encoding. Default: 'idenity'.
*/
defaultEncoding?: string | undefined;
/**
* Options for brotli compression.
*/
br?: zlib.BrotliOptions | false | undefined;
/**
* Options for gzip compression.
*/
gzip?: zlib.ZlibOptions | false | undefined;
/**
* Options for deflate compression.
*/
deflate?: zlib.ZlibOptions | false | undefined;
}
}
export = koaCompress;
These definitions were written by Jerry Chin, and Joel Gallant.
FAQs
TypeScript definitions for koa-compress
We found that @types/koa-compress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.