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

nordnet-next-api

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nordnet-next-api - npm Package Compare versions

Comparing version 2.3.4 to 2.4.0

lib/__tests__/expectations/post-json.js

5

lib/__tests__/expectations/index.js

@@ -23,2 +23,6 @@ 'use strict';

var _postJson = require('./post-json');
var _postJson2 = _interopRequireDefault(_postJson);
var _ping = require('./ping');

@@ -35,3 +39,4 @@

postUserLists: _postUserLists2.default,
postJson: _postJson2.default,
ping: _ping2.default
};

1

lib/__tests__/index.test.js

@@ -86,2 +86,3 @@ 'use strict';

describe('when making POST request with JSON payload', test(_expectations2.default.postUserSettings));
describe('when making POST JSON request', test(_expectations2.default.postJson));
});

@@ -11,2 +11,3 @@ 'use strict';

exports.post = post;
exports.postJson = postJson;
exports.put = put;

@@ -70,2 +71,12 @@ exports.del = del;

function postJson(url) {
var params = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var headers = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var merge = function merge(one, two) {
return Object.assign({}, one, two);
};
return post(url, params, merge(headers, { 'Content-type': 'application/json' }));
}
function put(url) {

@@ -102,2 +113,3 @@ var params = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];

post: post,
postJson: postJson,
put: put,

@@ -104,0 +116,0 @@ del: del

2

package.json
{
"name": "nordnet-next-api",
"version": "2.3.4",
"version": "2.4.0",
"description": "Nordnet nExt API Javascript client",

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

@@ -5,2 +5,3 @@ import getInstrument from './get-instrument';

import postUserLists from './post-user-lists';
import postJson from './post-json';
import ping from './ping';

@@ -13,3 +14,4 @@

postUserLists,
postJson,
ping,
};

@@ -54,2 +54,3 @@ import { initSandBox, respondWith, execute, expectations } from 'test-helper';

describe('when making POST request with JSON payload', test(tests.postUserSettings));
describe('when making POST JSON request', test(tests.postJson));
});

@@ -46,2 +46,7 @@ import es6Promise from 'es6-promise';

export function postJson(url, params = {}, headers = {}) {
const merge = (one, two) => Object.assign({}, one, two);
return post(url, params, merge(headers, { 'Content-type': 'application/json' }));
}
export function put(url, params = {}, headers = {}) {

@@ -72,2 +77,3 @@ const options = {

post,
postJson,
put,

@@ -74,0 +80,0 @@ del,

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