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

@apimatic/core

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apimatic/core - npm Package Compare versions

Comparing version 0.7.8 to 0.7.9

8

es/http/pathTemplate.js

@@ -49,3 +49,9 @@ import flatMap from 'lodash.flatmap';

var encode = function (m) {
return skipEncode || typeof m === 'bigint' ? m.toString() : encodeURIComponent(m);
var encodeParameter = '';
if (typeof m === 'string' || typeof m === 'number' || typeof m === 'bigint') {
encodeParameter = skipEncode || typeof m === 'bigint' ? m.toString() : encodeURIComponent(m);
}
return encodeParameter;
};

@@ -52,0 +58,0 @@

2

lib/http/pathTemplate.d.ts

@@ -11,3 +11,3 @@ /**

}
export declare type PathTemplatePrimitiveTypes = string | string[] | number | number[] | bigint | Array<bigint>;
export declare type PathTemplatePrimitiveTypes = string | string[] | number | number[] | bigint | Array<bigint> | unknown;
/** Path template argument type */

@@ -14,0 +14,0 @@ export declare type PathTemplateTypes = PathTemplatePrimitiveTypes | SkipEncode<PathTemplatePrimitiveTypes>;

@@ -40,3 +40,12 @@ "use strict";

var encode = function (m) {
return skipEncode || typeof m === 'bigint' ? m.toString() : encodeURIComponent(m);
var encodeParameter = '';
if (typeof m === 'string' ||
typeof m === 'number' ||
typeof m === 'bigint') {
encodeParameter =
skipEncode || typeof m === 'bigint'
? m.toString()
: encodeURIComponent(m);
}
return encodeParameter;
};

@@ -43,0 +52,0 @@ if (value instanceof SkipEncode) {

{
"name": "@apimatic/core",
"author": "Wajahat Iqbal",
"version": "0.7.8",
"version": "0.7.9",
"license": "SEE LICENSE IN LICENSE.md",

@@ -6,0 +6,0 @@ "sideEffects": false,

@@ -20,3 +20,4 @@ /**

| bigint
| Array<bigint>;
| Array<bigint>
| unknown;

@@ -53,4 +54,17 @@ /** Path template argument type */

let skipEncode = false;
const encode = (m: string | number | bigint) =>
skipEncode || typeof m === 'bigint' ? m.toString() : encodeURIComponent(m);
const encode = (m: string | number | bigint | unknown) => {
let encodeParameter = '';
if (
typeof m === 'string' ||
typeof m === 'number' ||
typeof m === 'bigint'
) {
encodeParameter =
skipEncode || typeof m === 'bigint'
? m.toString()
: encodeURIComponent(m);
}
return encodeParameter;
};
if (value instanceof SkipEncode) {

@@ -61,4 +75,4 @@ value = value.value;

return Array.isArray(value)
? (value as Array<string | number | bigint>)
.map<string | number | bigint>(encode)
? (value as Array<string | number | bigint | unknown>)
.map<string | number | bigint | unknown>(encode)
.join('/')

@@ -65,0 +79,0 @@ : [encode(value)];

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