# @types/knockout.punches

> TypeScript definitions for knockout.punches

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

## Install

```sh
npm install @types/knockout.punches
pnpm add @types/knockout.punches
yarn add @types/knockout.punches
bun add @types/knockout.punches
```

## Health

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

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.5.35 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51418 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/knockout](https://npm.io/package/@types/knockout.md) *

## Recent versions

- 0.5.35 (latest) — 2023-11-07
- 0.5.33 (ts3.0) — 2020-05-15
- 0.5.32 (ts2.3) — 2017-11-15
- 0.5.31 (ts2.0) — 2016-09-19
- 0.5.34 — 2023-10-18
- 0.5.30 — 2016-08-25
- 0.5.29 — 2016-08-19
- 0.5.28 — 2016-08-02
- 0.5.27 — 2016-07-14
- 0.5.26-alpha — 2016-07-08
- 0.5.25-alpha — 2016-07-04
- 0.5.24-alpha — 2016-07-02
- 0.5.23-alpha — 2016-07-01
- 0.5.22-alpha — 2016-07-01
- 0.5.21-alpha — 2016-05-25
- … 3 more at https://npm.io/package/@types/knockout.punches/versions

## README

# Installation
> `npm install --save @types/knockout.punches`

# Summary
This package contains type definitions for knockout.punches (https://github.com/mbest/knockout.punches).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout.punches.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/knockout.punches/index.d.ts)
````ts
/// <reference types="knockout" />

interface KnockoutPunchesStatic {
    enableAll(): void;
}

interface KnockoutPunchesFilters {
    // Convert the value to uppercase.
    uppercase(value: string): string;

    // Convert the value to lowercase.
    lowercase(value: string): string;

    // Perform a search and replace on the value using String#replace.
    replace(value: string, search: string, replace: string): string;

    // Trim the value if it’s longer than the given length. The trimmed portion is
    // replaced with ... or the replacement value, if given. By default, the value
    // is trimmed on the right but can be changed to left or middle through the
    // where option. For example: name | fit:10::'middle' will
    // convert Shakespeare to Shak...are.
    fit(value: number | string, length?: number, replacement?: string, trimWhere?: string): string;

    // Convert the value to a JSON string using ko.toJSON. You can give a space value to format the JSON output.
    json(rootObject: any, space?: any, replacer?: any): string;

    // Format the value using toLocaleString.
    number(value: number | string): string;

    // If the value is blank, null, or an empty array, replace it with the given default value
    default(value: any, defaultValue?: any): any;
}

interface KnockoutStatic {
    punches: KnockoutPunchesStatic;
    filters: KnockoutPunchesFilters;
}

declare module "knockout.punches" {
    export = punches;
}

declare var punches: KnockoutPunchesStatic;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/knockout](https://npmjs.com/package/@types/knockout)

# Credits
These definitions were written by [Stephen Lautier](https://github.com/johnnyreilly).

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