UNPKG

limax

Version:

Node.js module to generate URL slugs. Another one? This one cares about i18n and transliterates non-Latin scripts to conform to the RFC3986 standard. Mostly API-compatible with similar modules.

18 lines (14 loc) 415 B
// Copyright 2013 Lovell Fuller and others. // SPDX-License-Identifier: Apache-2.0 type Options = { custom?: string[] | { [key: string]: string; }; lang?: string; maintainCase?: boolean; replacement?: string; separator?: string; separateNumbers?: boolean; separateApostrophes?: boolean; tone?: boolean; } | string; declare function slug(text: string, opt?: Options): string; export default slug;