express-router-api
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -12,3 +12,3 @@ 'use strict'; | ||
} | ||
else if(typeof obj === 'object') { | ||
else if(obj && typeof obj === 'object' ) { | ||
let promisesToResolve = []; | ||
@@ -15,0 +15,0 @@ Object.keys(obj).map(key => { |
{ | ||
"name": "express-router-api", | ||
"version": "1.0.1", | ||
"description": "", | ||
"version": "1.0.2", | ||
"description": "Express router that lets you construct your API entirely on promises", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
10
test.js
@@ -138,3 +138,3 @@ 'use strict'; | ||
it('should support embedded promise array', () => { | ||
it('should support embedded promise array with a possible null', () => { | ||
routeTest((req, res) => { | ||
@@ -144,3 +144,7 @@ return Promise.resolve({ | ||
bar: [Promise.resolve('foo'),Promise.resolve({ | ||
xx: Promise.delay(10).then(()=>'ala') | ||
xx: Promise.delay(10).then(()=>'ala'), | ||
dd: null, | ||
zz: true, | ||
yy: false, | ||
mm: undefined | ||
})] | ||
@@ -152,3 +156,3 @@ }) | ||
return requestTest({ | ||
foo: {bar: ['foo', {xx: 'ala'}]} | ||
foo: {bar: ['foo', {xx: 'ala', dd: null, zz: true, yy: false}]} | ||
}); | ||
@@ -155,0 +159,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11385
301