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-utilscheckMulti: throws if the request is multi data, but the servicesallowsMulti(method)returnsfalsecreateRelated: simply create related items from a hook.forEachonDelete: simply remove/set null related items from a hook.paramsForServerparamsFromClientparseFieldsremoveRelated: 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
defineHooksfilterQueryflattenQuerydeflattenQuerygetItemsIsArray(context): returns{ items: any[], isArray: boolean }getPaginateisMulti(context) => Boolean: returns true, iffind,create/patch/remove: multiisPaginatedmarkHookForSkip: add hookName tocontext.params.skipHooks- also seeshouldSkipmergeQuery: deeply merges queriesmergeArrays: merges arrays with intersection optionspushSet: if existing array: push, else setsetQueryKeySafelysetResultEmptyshouldSkip: checkscontext.params.skipHooksfor'all' | '${hookName}' | '${type}:${hookName}'- also seemarkHookForSkip