Socket
Socket
Sign inDemoInstall

@alicloud/tea-util

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alicloud/tea-util - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

3

ChangeLog.txt

@@ -0,1 +1,4 @@

2023-06-26 Version: 1.4.6
1. Support static method `assertAsInteger()`
2022-11-16 Version: 1.4.5

@@ -2,0 +5,0 @@ 1. Support ca params for server and client

@@ -62,2 +62,7 @@ /// <reference types="node" />

static assertAsNumber(value: any): number;
/**
* Assert a value, if it is a integer, return it, otherwise throws
* @return the integer value
*/
static assertAsInteger(value: any): number;
static assertAsMap(value: any): {

@@ -64,0 +69,0 @@ [key: string]: any;

@@ -197,2 +197,12 @@ "use strict";

}
/**
* Assert a value, if it is a integer, return it, otherwise throws
* @return the integer value
*/
static assertAsInteger(value) {
if (Number.isInteger(value)) {
return value;
}
throw new Error(`The value is not a int number`);
}
static assertAsMap(value) {

@@ -199,0 +209,0 @@ if (value && typeof value === 'object' && !Array.isArray(value)) {

2

package.json
{
"name": "@alicloud/tea-util",
"version": "1.4.5",
"version": "1.4.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/client.js",

@@ -222,2 +222,13 @@ import { Readable } from 'stream';

/**
* Assert a value, if it is a integer, return it, otherwise throws
* @return the integer value
*/
static assertAsInteger(value: any): number {
if (Number.isInteger(value)) {
return value;
}
throw new Error(`The value is not a int number`);
}
static assertAsMap(value: any): { [key: string]: any } {

@@ -224,0 +235,0 @@ if (value && typeof value === 'object' && !Array.isArray(value)) {

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