Skip to content

diastremskii/feathers-hooks-common

 
 

Repository files navigation

feathers-hooks-common

Greenkeeper badge

Build Status Code Climate Coverage Status Dependency Status Download Status Slack Status

Useful hooks for use with Feathers services.

Migration to v3 from v2

Some hooks had features which were not initially apparent, e.g. remove did not remove when the call was made on the server. These features have been removed when they were infrequently used, or, when removal would result in a significant breaking change, new hooks have been introduced which deprecate the original ones.

Such features can be re-implemented using conditional hooks, with the additional benefit of making what is happening clearer.

Breaking changes:

  • All hooks and utilities are obtained from feathers-hooks-common rather than some from, say, feathers-hooks-common/promisify.
  • Some functions supported a deprecated predicate as their last param. This feature has been removed.
  • The populate hook now ignores pagination on joined services by default.

Deprecated:

  • The legacy populate hook -- with signature (string, ...) -- will be removed next version. Use the regular populate hook.
  • Use deleteByDot rather than setByDot(obj, path, value, true).
  • The disallow hook should be used instead of disable.
  • The discard hook should be used instead of remove. You will need to wrap discard in an conditional if you want it to work like remove does.

Documentation

Refer to Feathersjs documentation.

Installation

Run npm install feathers-hooks-common --save in your project folder (installs the latest v2 release).

Tests

npm test to run tests.

License

MIT. See LICENSE.

About

Useful hooks for use with Feathersjs services.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%