Socket
Socket
Sign inDemoInstall

@feathersjs/commons

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@feathersjs/commons - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

7

CHANGELOG.md
# Change Log
## [v1.4.0](https://github.com/feathersjs/commons/tree/v1.4.0) (2018-01-17)
[Full Changelog](https://github.com/feathersjs/commons/compare/v1.3.1...v1.4.0)
**Merged pull requests:**
- Add ability to skip all following hooks [\#65](https://github.com/feathersjs/commons/pull/65) ([sylvainlap](https://github.com/sylvainlap))
## [v1.3.1](https://github.com/feathersjs/commons/tree/v1.3.1) (2018-01-12)

@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/feathersjs/commons/compare/v1.3.0...v1.3.1)

19

lib/hooks.js
const { each, pick } = require('./utils')._;
function convertGetOrRemove (args) {
const [ id, params = {} ] = args;
// To skip further hooks
const SKIP = exports.SKIP = typeof Symbol !== 'undefined'
? Symbol('__feathersSkipHooks')
: '__feathersSkipHooks';
return { id, params };
}
const convertGetOrRemove = ([ id, params = {} ]) => ({ id, params });
const convertUpdateOrPatch = ([ id, data, params = {} ]) => ({ id, data, params });
function convertUpdateOrPatch (args) {
const [ id, data, params = {} ] = args;
return { id, data, params };
}
// To skip further hooks
const SKIP = exports.SKIP = typeof Symbol !== 'undefined' ? Symbol('__feathersSkipHooks') : '__feathersSkipHooks';
// Converters from service method arguments to hook object properties

@@ -19,0 +12,0 @@ exports.converters = {

{
"name": "@feathersjs/commons",
"version": "1.4.0",
"version": "1.4.1",
"description": "Shared Feathers utility functions",

@@ -51,5 +51,5 @@ "homepage": "https://github.com/feathersjs/commons",

"istanbul": "^1.1.0-alpha.1",
"mocha": "^4.0.0",
"mocha": "^5.0.0",
"semistandard": "^12.0.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