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 1.0.2 to 1.0.3

8

lib/__tests__/index.test.js

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

sandbox.server.respondWith('DELETE', '/next/2/user/settings/bar', [200, { 'Content-Type': 'application/json; charset=UTF-8', ntag: ntag }, '']);
sandbox.server.respondWith('/next/2/news?days=0', JSON.stringify([{ news_id: 1 }]));
}

@@ -173,2 +174,9 @@

describe('get with query params', function () {
beforeEach(settle(_index.get, '/next/2/news?days={days}', { days: 0 }));
it('should return expected response', function () {
return (0, _chai.expect)(response).to.deep.equal([{ news_id: 1 }]);
});
});
describe('post', function () {

@@ -175,0 +183,0 @@ beforeEach(settle(_index.get, '/next/2/user/settings/{key}', { key: 'foo' }, { 'Accept-Language': 'sv' }));

4

lib/index.js

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

var delimiter = '';
if (pathContainsQuery) {
if (pathContainsQuery && queryParams) {
delimiter = '&';

@@ -177,3 +177,3 @@ } else if (queryParams) {

return function matchParamKeyValue(match, key) {
if (!params[key]) {
if (params[key] === undefined) {
throw new Error('unknown parameter ' + key);

@@ -180,0 +180,0 @@ }

{
"name": "nordnet-next-api",
"version": "1.0.2",
"version": "1.0.3",
"description": "Nordnet nExt API Javascript client",

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

@@ -113,3 +113,3 @@ # Nordnet nExt API Javascript client

All open source code released by Nordnet is licenced under the MIT licence.
This open source project released by Nordnet is licenced under the MIT licence.

@@ -116,0 +116,0 @@

import 'test-helper';
import { expect } from 'chai';
import { get } from './../index';
import { post } from './../index';
import { put } from './../index';
import { del } from './../index';
import { get, post, put, del } from './../index';

@@ -45,2 +42,3 @@ describe('next-api', () => {

[200, { 'Content-Type': 'application/json; charset=UTF-8', ntag: ntag }, '']);
sandbox.server.respondWith('/next/2/news?days=0', JSON.stringify([{ news_id: 1 }]));
}

@@ -152,2 +150,7 @@

describe('get with query params', () => {
beforeEach(settle(get, '/next/2/news?days={days}', { days: 0 }));
it('should return expected response', () => expect(response).to.deep.equal([{ news_id: 1 }]));
});
describe('post', () => {

@@ -154,0 +157,0 @@ beforeEach(settle(get, '/next/2/user/settings/{key}', { key: 'foo' }, { 'Accept-Language': 'sv' }));

@@ -131,3 +131,3 @@ import es6Promise from 'es6-promise';

let delimiter = '';
if (pathContainsQuery) {
if (pathContainsQuery && queryParams) {
delimiter = '&';

@@ -147,3 +147,3 @@ } else if (queryParams) {

return function matchParamKeyValue(match, key) {
if (!params[key]) {
if (params[key] === undefined) {
throw new Error(`unknown parameter ${key}`);

@@ -150,0 +150,0 @@ }

@@ -30,3 +30,3 @@ var webpack = require('webpack');

output: {
library: 'norndet-next-api',
library: 'nordnet-next-api',
libraryTarget: 'umd'

@@ -33,0 +33,0 @@ },

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