NOTE: This package was previously named
feathers-utils. The ownership of the package name was transferred to feathers. The new package name is@fratzinger/feathers-utils. Starting from version 7.0.1 the package is published under the new name. Please update your dependencies accordingly.
npm i @fratzinger/feathers-utils
-
checkMulti: throws if the request is multi data, but the servicesallowsMulti(method)returnsfalse -
createRelated: simply create related items from a hook. forEach-
onDelete: simply remove/set null related items from a hook. paramsForServerparamsFromClientparseFields-
removeRelated: simple remove related items from a hook. Basicallycascadeat feathers level. -
runPerItem: run a function for every item. Meant formulti:true. -
setData: map properties fromcontexttodata. Something likeuserId: context.params.user.id
-
mixins/debounceMixin&mixins/DebouncedStore
defineHooksfilterQueryflattenQuerydeflattenQuery-
getItemsIsArray(context): returns{ items: any[], isArray: boolean } getPaginate-
isMulti(context) => Boolean: returns true, iffind,create/patch/remove: multi isPaginated-
markHookForSkip: add hookName tocontext.params.skipHooks- also seeshouldSkip -
mergeQuery: deeply merges queries -
mergeArrays: merges arrays with intersection options -
pushSet: if existing array: push, else set setQueryKeySafelysetResultEmpty-
shouldSkip: checkscontext.params.skipHooksfor'all' | '${hookName}' | '${type}:${hookName}'- also seemarkHookForSkip