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

@types/accepts

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/accepts - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

55

accepts/index.d.ts

@@ -6,21 +6,52 @@ // Type definitions for accepts 1.3

/// <reference types="node" />
import { IncomingMessage } from "http";
declare namespace accepts {
export interface Headers {
[key: string]: string | string[];
}
declare namespace accepts {
export interface Accepts {
charset(charsets: string[]): string | string[] | boolean;
charset(...charsets: string[]): string | string[] | boolean;
/**
* Return the first accepted charset. If nothing in `charsets` is accepted, then `false` is returned.
*/
charset(charsets: string[]): string | false;
charset(...charsets: string[]): string | false;
/**
* Return the charsets that the request accepts, in the order of the client's preference (most preferred first).
*/
charsets(): string[];
encoding(encodings: string[]): string | string[] | boolean;
encoding(...encodings: string[]): string | string[] | boolean;
/**
* Return the first accepted encoding. If nothing in `encodings` is accepted, then `false` is returned.
*/
encoding(encodings: string[]): string | false;
encoding(...encodings: string[]): string | false;
/**
* Return the encodings that the request accepts, in the order of the client's preference (most preferred first).
*/
encodings(): string[];
language(languages: string[]): string | string[] | boolean;
language(...languages: string[]): string | string[] | boolean;
/**
* Return the first accepted language. If nothing in `languages` is accepted, then `false` is returned.
*/
language(languages: string[]): string | false;
language(...languages: string[]): string | false;
/**
* Return the languages that the request accepts, in the order of the client's preference (most preferred first).
*/
languages(): string[];
type(types: string[]): string | string[] | boolean;
type(...types: string[]): string | string[] | boolean;
/**
* Return the first accepted type (and it is returned as the same text as what appears in the `types` array). If nothing in `types` is accepted, then `false` is returned.
*
* The `types` array can contain full MIME types or file extensions. Any value that is not a full MIME types is passed to `require('mime-types').lookup`.
*/
type(types: string[]): string | false;
type(...types: string[]): string | false;
/**
* Return the types that the request accepts, in the order of the client's preference (most preferred first).
*/
types(): string[];

@@ -30,4 +61,4 @@ }

declare function accepts(req: IncomingMessage): accepts.Accepts;
declare function accepts(req: { headers: accepts.Headers }): accepts.Accepts;
export = accepts;
{
"name": "@types/accepts",
"version": "1.3.0",
"version": "1.3.1",
"description": "TypeScript definitions for accepts",

@@ -13,7 +13,6 @@ "license": "MIT",

"scripts": {},
"dependencies": {
"@types/node": "*"
},
"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "a69551ffbcc9dfdf109b063fce1fd3ca60014a946cf20613a06ae1a21d485b23"
"typesPublisherContentHash": "f8beea30e71f609258e5624ab1dadbcd3457ff7fe496e5914d601e080ab1a56e",
"typeScriptVersion": "2.0"
}

@@ -8,12 +8,10 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/accepts
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/accepts
Additional Details
* Last updated: Wed, 30 Nov 2016 23:08:29 GMT
* File structure: ProperModule
* Library Dependencies: node
* Module Dependencies: http
* Global values: accepts
* Last updated: Tue, 07 Feb 2017 20:01:00 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Stefan Reichel <https://github.com/bomret>.
{
"authors": "Stefan Reichel <https://github.com/bomret>",
"libraryDependencies": [
"node"
],
"moduleDependencies": [
"http"
],
"libraryMajorVersion": 1,
"libraryMinorVersion": 3,
"name": "accepts",
"libraryName": "accepts",
"typingsPackageName": "accepts",
"projectName": "https://github.com/jshttp/accepts",
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"sourceBranch": "types-2.0",
"kind": "ProperModule",
"globals": [
"accepts"
],
"declaredModules": [
"accepts"
],
"files": [
"index.d.ts"
],
"hasPackageJson": false,
"contentHash": "a69551ffbcc9dfdf109b063fce1fd3ca60014a946cf20613a06ae1a21d485b23"
"data": {
"authors": "Stefan Reichel <https://github.com/bomret>",
"dependencies": {},
"pathMappings": {},
"libraryMajorVersion": 1,
"libraryMinorVersion": 3,
"typeScriptVersion": "2.0",
"libraryName": "accepts",
"typingsPackageName": "accepts",
"projectName": "https://github.com/jshttp/accepts",
"sourceRepoURL": "https://www.github.com/DefinitelyTyped/DefinitelyTyped",
"globals": [],
"declaredModules": [
"accepts/."
],
"files": [
"index.d.ts"
],
"hasPackageJson": false,
"contentHash": "f8beea30e71f609258e5624ab1dadbcd3457ff7fe496e5914d601e080ab1a56e"
},
"isLatest": true
}
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