Socket
Socket
Sign inDemoInstall

@types/linkify-it

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.0.2

8

linkify-it/index.d.ts

@@ -26,3 +26,3 @@ // Type definitions for linkify-it 3.0.2

validate: string | RegExp | Validate;
normalize?: (match: Match) => void;
normalize?: ((match: Match) => void) | undefined;
}

@@ -37,5 +37,5 @@

interface Options {
fuzzyLink?: boolean;
fuzzyIP?: boolean;
fuzzyEmail?: boolean;
fuzzyLink?: boolean | undefined;
fuzzyIP?: boolean | undefined;
fuzzyEmail?: boolean | undefined;
}

@@ -42,0 +42,0 @@

{
"name": "@types/linkify-it",
"version": "3.0.1",
"version": "3.0.2",
"description": "TypeScript definitions for linkify-it",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it",
"license": "MIT",

@@ -36,4 +37,4 @@ "contributors": [

"dependencies": {},
"typesPublisherContentHash": "9fc8543d66222089a8fbe0420900e95c74df7ffefd5c092b03ec5a8ffeaca80d",
"typeScriptVersion": "3.5"
"typesPublisherContentHash": "001e13e25578e89bdd72aba9710cc97e62dacb4982344e91c4d666aa7cfd642d",
"typeScriptVersion": "3.6"
}

@@ -9,5 +9,78 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/linkify-it/index.d.ts)
````ts
// Type definitions for linkify-it 3.0.2
// Project: https://github.com/markdown-it/linkify-it
// Definitions by: Lindsey Smith <https://github.com/praxxis>
// Robert Coie <https://github.com/rapropos/typed-linkify-it>
// Alex Plumb <https://github.com/alexplumb>
// Rafa Gares <https://github.com/ragafus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
declare const LinkifyIt: {
(
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options
): LinkifyIt.LinkifyIt;
new (
schemas?: LinkifyIt.SchemaRules | LinkifyIt.Options,
options?: LinkifyIt.Options
): LinkifyIt.LinkifyIt;
};
declare namespace LinkifyIt {
type Validate = (text: string, pos: number, self: LinkifyIt) => number | boolean;
interface FullRule {
validate: string | RegExp | Validate;
normalize?: ((match: Match) => void) | undefined;
}
type Rule = string | FullRule;
interface SchemaRules {
[schema: string]: Rule;
}
interface Options {
fuzzyLink?: boolean | undefined;
fuzzyIP?: boolean | undefined;
fuzzyEmail?: boolean | undefined;
}
interface Match {
index: number;
lastIndex: number;
raw: string;
schema: string;
text: string;
url: string;
}
interface LinkifyIt {
// Use overloads to provide contextual typing to `FullRule.normalize`, which is ambiguous with string.normalize
// This appears unneeded to the unified-signatures lint rule.
add(schema: string, rule: string): LinkifyIt;
// tslint:disable-next-line: unified-signatures
add(schema: string, rule: FullRule | null): LinkifyIt;
match(text: string): Match[] | null;
normalize(raw: string): string;
pretest(text: string): boolean;
set(options: Options): LinkifyIt;
test(text: string): boolean;
testSchemaAt(text: string, schemaName: string, pos: number): number;
tlds(list: string | string[], keepOld?: boolean): LinkifyIt;
re: {
[key: string]: RegExp;
};
}
}
export = LinkifyIt;
````
### Additional Details
* Last updated: Tue, 16 Mar 2021 16:34:08 GMT
* Last updated: Tue, 06 Jul 2021 22:02:41 GMT
* Dependencies: none

@@ -14,0 +87,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc