npm.io
1.1.6 • Published 2 years ago

@types/isbn-utils

Licence
MIT
Version
1.1.6
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/isbn-utils

Summary

This package contains type definitions for isbn-utils (https://github.com/GitbookIO/isbn-utils).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/isbn-utils.

index.d.ts

export type IGroups = any;

export class ISBNcodes {
    readonly source: string;
    readonly prefix: string;
    readonly group: string;
    readonly publisher: string;
    readonly article: string;
    readonly check: string;
    readonly check10: string;
    readonly check13: string;
    readonly groupname: string;
}

export class ISBN {
    constructor(val: string, groups: IGroups);
    asIsbn10(hyphenate?: boolean): string;
    asIsbn13(hyphenate?: boolean): string;
    codes: ISBNcodes;
    isIsbn10(): boolean;
    isIsbn13(): boolean;
    isValid(): boolean;
}

export function asIsbn10(isbn: string, hyphenate?: boolean): string;
export function asIsbn13(isbn: string, hyphenate?: boolean): string;
export function parse(isbn: string, groups?: IGroups): ISBN | null;
export function hyphenate(isbn: string): string;
export function isValid(isbn: string, groups?: IGroups): boolean;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: none

Credits

These definitions were written by Jørgen Elgaard Larsen.