Some utils for projects using '@feathersjs/feathers'
npm install @fratzinger/feathers-utils





> NOTE: This is the version for Feathers v5. For Feathers v4 use feathers-utils v1
``shell`
npm i feathers-utils
- checkMulti: throws if the request is multi data, but the services allowsMulti(method) returns falsecreateRelated
- : simply create related items from a hook.forEach
- onDelete
- : simply remove/set null related items from a hook.paramsForServer
- paramsFromClient
- parseFields
- removeRelated
- : simple remove related items from a hook. Basically cascade at feathers level.runPerItem
- : run a function for every item. Meant for multi:true.setData
- : map properties from context to data. Something like userId: context.params.user.id
- mixins/debounceMixin & mixins/DebouncedStore
- defineHooksfilterQuery
- flattenQuery
- deflattenQuery
- getItemsIsArray(context)
- : returns { items: any[], isArray: boolean }getPaginate
- isMulti(context) => Boolean
- : returns true, if find, create/patch/remove: multiisPaginated
- markHookForSkip
- : add hookName to context.params.skipHooks - also see shouldSkipmergeQuery
- : deeply merges queriesmergeArrays
- : merges arrays with intersection optionspushSet
- : if existing array: _push_, else _set_setQueryKeySafely
- setResultEmpty
- shouldSkip
- : checks context.params.skipHooks for 'all' | '${hookName}' | '${type}:${hookName}' - also see markHookForSkip`