@feathersjs/commons
Advanced tools
Comparing version 1.2.0 to 1.3.0
# Change Log | ||
## [v1.2.0](https://github.com/feathersjs/commons/tree/v1.2.0) (2017-10-25) | ||
[Full Changelog](https://github.com/feathersjs/commons/compare/v1.1.0...v1.2.0) | ||
**Merged pull requests:** | ||
- Bring back makeUrl [\#62](https://github.com/feathersjs/commons/pull/62) ([daffl](https://github.com/daffl)) | ||
- adding codeclimate config [\#60](https://github.com/feathersjs/commons/pull/60) ([ekryski](https://github.com/ekryski)) | ||
## [v1.1.0](https://github.com/feathersjs/commons/tree/v1.1.0) (2017-10-23) | ||
@@ -4,0 +12,0 @@ [Full Changelog](https://github.com/feathersjs/commons/compare/v1.0.0...v1.1.0) |
@@ -1,2 +0,2 @@ | ||
const { each } = require('./utils')._; | ||
const { each, pick } = require('./utils')._; | ||
@@ -38,2 +38,9 @@ function convertGetOrRemove (args) { | ||
Object.defineProperty(hook, 'toJSON', { | ||
value () { | ||
return pick(this, 'type', 'method', 'path', | ||
'params', 'id', 'data', 'result', 'error'); | ||
} | ||
}); | ||
return Object.assign(hook, data, { | ||
@@ -40,0 +47,0 @@ method, |
@@ -61,3 +61,5 @@ // Removes all leading and trailing slashes from a path | ||
keys.forEach(key => { | ||
result[key] = source[key]; | ||
if (source[key] !== undefined) { | ||
result[key] = source[key]; | ||
} | ||
}); | ||
@@ -64,0 +66,0 @@ return result; |
{ | ||
"name": "@feathersjs/commons", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Shared Feathers utility functions", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/feathersjs/commons", |
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
37128
573