# @types/pre-suf

> TypeScript definitions for pre-suf

Latest version **1.1.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pre-suf
pnpm add @types/pre-suf
yarn add @types/pre-suf
bun add @types/pre-suf
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2023-11-07 |
| First published | 2020-04-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pre-suf
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pre-suf
- npm.io page: https://npm.io/package/@types/pre-suf

## Recent versions

- 1.1.2 (latest) — 2023-11-07
- 1.1.0 (ts2.8) — 2020-04-13
- 1.1.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/pre-suf`

# Summary
This package contains type definitions for pre-suf (https://github.com/kaelzhang/node-pre-suf#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pre-suf.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pre-suf/index.d.ts)
````ts
/**
 * Manipulate strings with prefixes and suffixes.
 */

/**
 * Ensures that the new string will have prefix at the beginning of str.
 * If str does not begin with prefix, prefix will be added to the beggining of str.
 */
export function ensureLeading(str: string, prefix: string): string;
/**
 * Removes the leading prefix of str.
 */
export function removeLeading(str: string, prefix: string): string;
/**
 * Ensures that the new string will have suffix at the end of str.
 * If str does not end with suffix, suffix will be added at the end of str.
 */
export function ensureEnding(str: string, suffix: string): string;
/**
 * Removes the ending suffix of str.
 */
export function removeEnding(str: string, suffix: string): string;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

---
_Source: https://npm.io/package/@types/pre-suf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
