@types/slug
Advanced tools
Comparing version 0.9.1 to 5.0.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for slug 0.9 | ||
// Type definitions for slug 5.0 | ||
// Project: https://github.com/trott/node-slug | ||
@@ -8,16 +8,5 @@ // Definitions by: Mohamed Hegazy <https://github.com/mhegazy> | ||
interface CharMap { | ||
[x: string]: string; | ||
} | ||
declare function slug(string: string, replacement: string): string; | ||
declare function slug(string: string, opts?: slug.Options): string; | ||
interface Mode { | ||
charmap?: CharMap| null; | ||
lower?: boolean| null; | ||
multicharmap?: CharMap| null; | ||
remove?: RegExp| null; | ||
replacement?: string | null; | ||
symbols?: boolean| null; | ||
} | ||
declare function slug(string: string, opts?: Mode | string): string; | ||
declare namespace slug { | ||
@@ -35,2 +24,20 @@ const charmap: CharMap; | ||
const multicharmap: CharMap; | ||
function extend(entry: CharMap): void; | ||
function reset(): void; | ||
interface Mode { | ||
charmap?: CharMap | null; | ||
lower?: boolean | null; | ||
multicharmap?: CharMap | null; | ||
remove?: RegExp | null; | ||
replacement?: string | null; | ||
symbols?: boolean | null; | ||
} | ||
type Options = { | ||
locale?: string; | ||
} & Partial<Mode>; | ||
type CharMap = Record<string, string>; | ||
} |
{ | ||
"name": "@types/slug", | ||
"version": "0.9.1", | ||
"version": "5.0.0", | ||
"description": "TypeScript definitions for slug", | ||
@@ -14,11 +14,12 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git" | ||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
"directory": "types/slug" | ||
}, | ||
"scripts": {}, | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "36eea41f2dd8ea13d36e7f44369b760ff84cceda2e34fbe231f0fff92ba4087a", | ||
"typeScriptVersion": "2.0" | ||
"typesPublisherContentHash": "6f2aab1facaf5f1cdf642271751fd2676a0b89d263b21d7a126a3a0b4be74b82", | ||
"typeScriptVersion": "3.5" | ||
} |
@@ -5,9 +5,9 @@ # Installation | ||
# Summary | ||
This package contains type definitions for slug ( https://github.com/trott/node-slug ). | ||
This package contains type definitions for slug (https://github.com/trott/node-slug). | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slug | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/slug. | ||
Additional Details | ||
* Last updated: Wed, 13 Feb 2019 21:06:21 GMT | ||
### Additional Details | ||
* Last updated: Mon, 24 May 2021 11:31:33 GMT | ||
* Dependencies: none | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Mohamed Hegazy <https://github.com/mhegazy>. | ||
These definitions were written by [Mohamed Hegazy](https://github.com/mhegazy). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3366
34
1