@alicloud/tea-util
Advanced tools
Comparing version 1.2.6 to 1.3.0
@@ -61,2 +61,3 @@ /// <reference types="node" /> | ||
}; | ||
static assertAsBytes(value: any): Buffer; | ||
static getUserAgent(userAgent: string): string; | ||
@@ -63,0 +64,0 @@ static is2xx(code: number): boolean; |
@@ -176,2 +176,8 @@ "use strict"; | ||
} | ||
static assertAsBytes(value) { | ||
if (Buffer.isBuffer(value)) { | ||
return value; | ||
} | ||
throw new Error(`The value is not bytes`); | ||
} | ||
static getUserAgent(userAgent) { | ||
@@ -178,0 +184,0 @@ if (!userAgent || !userAgent.length) { |
{ | ||
"name": "@alicloud/tea-util", | ||
"version": "1.2.6", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/client.js", |
@@ -211,2 +211,9 @@ import { Readable } from 'stream'; | ||
static assertAsBytes(value: any): Buffer { | ||
if (Buffer.isBuffer(value)) { | ||
return value; | ||
} | ||
throw new Error(`The value is not bytes`); | ||
} | ||
static getUserAgent(userAgent: string): string { | ||
@@ -213,0 +220,0 @@ if(!userAgent || !userAgent.length){ |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
21037
481
0