1.2.5 • Published 6 months ago
@types/parse-full-name v1.2.5
Installation
npm install --save @types/parse-full-name
Summary
This package contains type definitions for parse-full-name (https://github.com/dschnelldavis/parse-full-name).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse-full-name.
index.d.ts
// Type definitions for parse-full-name 1.2
// Project: https://github.com/dschnelldavis/parse-full-name
// Definitions by: n8 <https://github.com/n8Guy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.0
export type partToReturn =
| 'title'
| 'first'
| 'middle'
| 'last'
| 'nick'
| 'suffix'
| 'error'
| 'all';
export interface Name {
title?: string | undefined;
first?: string | undefined;
middle?: string | undefined;
last?: string | undefined;
nick?: string | undefined;
suffix?: string | undefined;
error?: [] | undefined;
}
/**
* Parses a string containing a person's full name, in any format
* @param nameToParse The name to be parsed
* @param partToReturn The name of a single part to return
* @param fixCase Fix case of output name
* @param stopOnError Makes parsing errors throw JavaScript errors
* @param useLongLists Use long prefix, suffix, and title lists
*/
export function parseFullName(
nameToParse: string,
partToReturn?: partToReturn,
fixCase?: boolean | -1 | 0 | 1,
stopOnError?: boolean | 0 | 1,
useLongLists?: boolean | 0 | 1
): Name;
Additional Details
- Last updated: Sun, 11 Jul 2021 15:01:13 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by n8.