Useful hooks for use with Feathers services.
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-commonrather 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
populatehook. - Use
deleteByDotrather thansetByDot(obj, path, value, true). - The
disallowhook should be used instead ofdisable. - The
discardhook should be used instead ofremove. You will need to wrapdiscardin an conditional if you want it to work likeremovedoes.
Refer to Feathersjs documentation.
Run npm install feathers-hooks-common --save in your project folder (installs the latest v2 release).
npm test to run tests.
MIT. See LICENSE.
