New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/inflected

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/inflected

TypeScript definitions for inflected

2.1.3
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Weekly downloads
23K
-12.56%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/inflected

Summary

This package contains type definitions for inflected (https://github.com/martinandert/inflected).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/inflected.

index.d.ts

export interface Humanize {
    capitalize?: boolean;
}

export interface Parameterize {
    preserveCase?: boolean;
    separator?: string;
}

export interface Transliterate {
    locale?: string;
    replacement?: string;
}

export interface Inflections {
    acronym(word: string): void;
    plural(rule: RegExp, replacement: string): void;
    plural(rule: string): void;
    singular(rule: RegExp, replacement: string): void;
    singular(rule: string): void;
    irregular(singular: string, plural: string): void;
    uncountable(...words: string[]): void;
    human(rule: RegExp | string, replacement: string): void;
    clear(scope?: string): void;
}

export interface Transliterations {
    approximate(original: string, replacement: string): void;
}

export function pluralize(word: string, locale?: string): string;
export function singularize(word: string, locale?: string): string;
export function camelize(term: string, uppercaseFirstLetter?: boolean): string;
export function underscore(camelCaseWord: string): string;
export function humanize(lowerCaseAndUnderscoredWord: string, options?: Humanize): string;
export function titleize(sentence: string): string;
export function tableize(className: string): string;
export function classify(tableName: string): string;
export function dasherize(underscoredWord: string): string;
export function foreignKey(className: string, separateClassNameAndIdWithUnderscore?: boolean): string;
export function ordinal(number: number): string;
export function ordinalize(number: number): string;
export function inflections(locale: string, inflect?: (inflect: Inflections) => void): void;
export function inflections(inflect?: (inflect: Inflections) => void): void;
export function transliterate(sentence: string, options?: Transliterate): string;
export function transliterations(locale: string, transliterate?: (transliterate: Transliterations) => void): void;
export function transliterations(transliterate?: (transliterate: Transliterations) => void): void;
export function parameterize(sentence: string, options?: Parameterize): string;
export function constantify(words: string): string;
export function capitalize(word?: string | null): string;

export as namespace Inflector;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Daniel Schmidt, and Jon Clerck.

FAQs

Package last updated on 07 Nov 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