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

@divine/headers

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@divine/headers - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

3

lib/src/content-headers.d.ts

@@ -12,6 +12,7 @@ export interface ContentHeaderParams {

param(name: string, fallback: string): string;
setParam(name: string, value: string | number | undefined): this;
valueOf(): string;
}
export declare class ContentDisposition extends ContentHeader {
constructor(unparsed: string);
constructor(unparsed: string, filename?: string);
get filename(): string | undefined;

@@ -18,0 +19,0 @@ }

@@ -38,2 +38,11 @@ "use strict";

}
setParam(name, value) {
if (value !== undefined) {
this.params[name] = String(value);
}
else {
delete this.params[name];
}
return this;
}
valueOf() {

@@ -54,4 +63,5 @@ let params = '';

class ContentDisposition extends ContentHeader {
constructor(unparsed) {
constructor(unparsed, filename) {
super(unparsed, 'content-disposition');
this.setParam('filename', filename);
}

@@ -58,0 +68,0 @@ get filename() {

{
"name": "@divine/headers",
"version": "1.0.0",
"version": "1.1.0",
"description": "The Divine HTTP Header Library",

@@ -5,0 +5,0 @@ "main": "lib/src/index.js",

@@ -50,2 +50,13 @@ export interface ContentHeaderParams {

setParam(name: string, value: string | number | undefined): this {
if (value !== undefined) {
this.params[name] = String(value);
}
else {
delete this.params[name];
}
return this;
}
valueOf(): string {

@@ -71,4 +82,6 @@ let params = '';

export class ContentDisposition extends ContentHeader {
constructor(unparsed: string) {
constructor(unparsed: string, filename?: string) {
super(unparsed, 'content-disposition');
this.setParam('filename', filename);
}

@@ -75,0 +88,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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