Skip to content

Commit

Permalink
Add TypeScript type definitions #32 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithYeh authored and lovell committed Sep 27, 2019
1 parent 5127b21 commit ce2e7d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type Options = {
custom?: string[] | { [key: string]: string; };
lang?: string;
maintainCase?: boolean;
replacement?: string;
separator?: string;
separateNumbers?: boolean;
tone?: boolean;
} | string;

declare function slug(text: string, opt?: Options): string;

export = slug;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "limax",
"version": "1.7.0",
"main": "./lib/limax",
"types": "index.d.ts",
"description": "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.",
"repository": {
"type": "git",
Expand Down

0 comments on commit ce2e7d2

Please sign in to comment.