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

hupun-open-api-nodejs-sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hupun-open-api-nodejs-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

9

lib/index.esm.js

@@ -71,3 +71,3 @@ import axios from 'axios';

function HupunClient(config) {
this.url = "https://open-api.hupun.com/api";
this.url = 'https://open-api.hupun.com/api';
this.appkey = config.appkey;

@@ -90,2 +90,9 @@ this.appsecret = config.appsecret;

var paramsToSign = __assign(__assign({}, params), { _app: this.appkey });
// 检查下所有参数,如果是object的,转化成jsonstring
for (var _i = 0, _a = Object.keys(paramsToSign); _i < _a.length; _i++) {
var k = _a[_i];
if (typeof paramsToSign[k] === 'object') {
paramsToSign[k] = JSON.stringify(paramsToSign[k]);
}
}
var stringToSign = this.appsecret + queryString.stringify(paramsToSign) + this.appsecret;

@@ -92,0 +99,0 @@ return stringToSign;

@@ -81,3 +81,3 @@ 'use strict';

function HupunClient(config) {
this.url = "https://open-api.hupun.com/api";
this.url = 'https://open-api.hupun.com/api';
this.appkey = config.appkey;

@@ -100,2 +100,9 @@ this.appsecret = config.appsecret;

var paramsToSign = __assign(__assign({}, params), { _app: this.appkey });
// 检查下所有参数,如果是object的,转化成jsonstring
for (var _i = 0, _a = Object.keys(paramsToSign); _i < _a.length; _i++) {
var k = _a[_i];
if (typeof paramsToSign[k] === 'object') {
paramsToSign[k] = JSON.stringify(paramsToSign[k]);
}
}
var stringToSign = this.appsecret + queryString__default['default'].stringify(paramsToSign) + this.appsecret;

@@ -102,0 +109,0 @@ return stringToSign;

2

package.json
{
"name": "hupun-open-api-nodejs-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "对接万里牛ERP开放接口的NodeJS SDK",

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

@@ -30,4 +30,8 @@ # hupun-open-api-nodejs-sdk

.catch((e) => {
console.error(e.message);
if (e.response) {
console.error(e.response.data);
} else {
console.error(e.message);
}
});
```
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