# @types/ngstorage

> TypeScript definitions for ngstorage

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

## Install

```sh
npm install @types/ngstorage
pnpm add @types/ngstorage
yarn add @types/ngstorage
bun add @types/ngstorage
```

## 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; pre 1.0.

Negative: abandoned.

## Facts

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

## Links

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

## Recent versions

- 0.3.39 (latest) — 2023-11-07
- 0.3.37 (ts3.6) — 2021-07-09
- 0.3.36 (ts2.3) — 2017-06-23
- 0.3.35 (ts2.0) — 2017-05-01
- 0.3.38 — 2023-10-18
- 0.3.34 — 2017-02-07
- 0.3.33 — 2016-09-19
- 0.3.32 — 2016-08-25
- 0.3.31 — 2016-08-19
- 0.3.30 — 2016-08-02
- 0.3.29 — 2016-07-14
- 0.3.28-alpha — 2016-07-08
- 0.3.26-alpha — 2016-07-04
- 0.3.25-alpha — 2016-07-02
- 0.3.24-alpha — 2016-07-01
- … 5 more at https://npm.io/package/@types/ngstorage/versions

## README

# Installation
> `npm install --save @types/ngstorage`

# Summary
This package contains type definitions for ngstorage (https://github.com/gsklee/ngStorage).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ngstorage.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ngstorage/index.d.ts)
````ts
export namespace ngStorage {
    interface StorageService {
        /**
         * @return true if the storage service is supported by the browser.
         */
        $supported(): boolean;

        /**
         * Adds default values to the store.
         * Copies all properties of the default items to the store.
         * If the store already has one of these properties it will skip it.
         *
         * @param items object holding the default values.
         * @return the modified storage service.
         */
        $default<T>(items: T): StorageService & T;

        /**
         * Removes all properties from the store.
         *
         * @param items optional object holding the default values to initialize the store after reset.
         * @return the modified storage service.
         */
        $reset<T>(items?: T): StorageService & T;

        $apply(): void;
        $sync(): void;

        /**
         * Access to the properties of the store.
         */
        [key: string]: any;
    }

    interface StorageProvider extends angular.IServiceProvider {
        get<T>(key: string): T | boolean;
        set<T>(key: string, value: T): T | boolean;
        remove(key: string): void;

        supported(): boolean;
        setKeyPrefix(prefix: string): void;
        setSerializer(serializer: (value: any) => string): void;
        setDeserializer(deserializer: (value: string) => any): void;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Jakub Pistek](https://github.com/kubiq).

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