# @postinumero/map-get-with-default

> ```js import get from "@postinumero/map-get-with-default";

Latest version **1.0.0** (published 2025-06-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @postinumero/map-get-with-default
pnpm add @postinumero/map-get-with-default
yarn add @postinumero/map-get-with-default
bun add @postinumero/map-get-with-default
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2025-06-02 |
| First published | 2019-04-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Arno Saine |
| Maintainers | arnosaine |

## Links

- npm: https://www.npmjs.com/package/@postinumero/map-get-with-default
- Repository: https://github.com/ArnoSaine/postinumero
- Homepage: https://github.com/ArnoSaine/postinumero/tree/main/packages/map-get-with-default
- Issues: https://github.com/ArnoSaine/postinumero/issues
- npm.io page: https://npm.io/package/@postinumero/map-get-with-default

## Recent versions

- 1.0.0 (latest) — 2025-06-02
- 0.2.0 — 2021-09-18
- 0.1.2 — 2020-12-13
- 0.1.1 — 2020-12-13
- 0.1.0 — 2019-04-01

## README

# @postinumero/map-get-with-default

## Example

```js
import get from "@postinumero/map-get-with-default";

const map = new Map();

// Using the proposed bind operator (::) (https://github.com/tc39/proposal-bind-operator)
console.log(map::get("x", () => "foo")); // => 'foo'

console.log(get(map, "x", () => "foo2")); // => 'foo'

console.log(map.get("x")); // => 'foo'
```

---
_Source: https://npm.io/package/@postinumero/map-get-with-default · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
