Skip to content

setSlug

Source Code | Documentation

Fix slugs in URL, e.g. /stores/:storeId.

ts
  import { 
setSlug
} from 'feathers-utils/hooks';

Type declaration

ts
/**
 * Fix slugs in URL, e.g. /stores/:storeId.
 *
 * @see https://utils.feathersjs.com/hooks/set-slug.html
 */
export declare const setSlug: <H extends HookContext = HookContext>(
  slug: string,
  fieldName?: string,
) => (context: H, next?: NextFunction) => any
ArgumentTypeDescription
slugstring
fieldNamestring
typemethodsmulti
before, after, aroundallyes

Released under the MIT License.