Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/slug

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/slug

TypeScript definitions for slug

  • 5.0.6
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Installation

npm install --save @types/slug

Summary

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.

index.d.ts

export = slug;
export as namespace slug;

declare function slug(string: string, replacement: string): string;
declare function slug(string: string, opts?: slug.Options): string;

declare namespace slug {
    const charmap: CharMap;
    const defaults: {
        charmap: CharMap;
        mode: string;
        modes: {
            pretty: Mode;
            rfc3986: Mode;
        };
        multicharmap: CharMap;
    };
    const multicharmap: CharMap;

    function extend(entry: CharMap): void;
    function reset(): void;

    interface Mode {
        charmap?: CharMap | null | undefined;
        lower?: boolean | null | undefined;
        multicharmap?: CharMap | null | undefined;
        remove?: RegExp | null | undefined;
        replacement?: string | null | undefined;
        symbols?: boolean | null | undefined;
        trim?: boolean | null | undefined;
    }

    type Options = {
        locale?: string | undefined;
        mode?: "pretty" | "rfc3986" | null | undefined;
    } & Partial<Mode>;

    type CharMap = Record<string, string>;
}

Additional Details

  • Last updated: Wed, 18 Oct 2023 11:45:06 GMT
  • Dependencies: none

Credits

These definitions were written by Mohamed Hegazy.

FAQs

Package last updated on 18 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc