# map-promised

> Convert a Map to a Promised Map.

Latest version **0.1.1** (published 2017-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install map-promised
pnpm add map-promised
yarn add map-promised
bun add map-promised
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2017-09-11 |
| First published | 2017-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | wolfram77@gmail.com |
| Maintainers | wolfram77 |
| Keywords | map, promised |

## Links

- npm: https://www.npmjs.com/package/map-promised
- Repository: https://github.com/wolfram77/node-mappromised
- Homepage: https://github.com/wolfram77/node-mappromised#readme
- Issues: https://github.com/wolfram77/node-mappromised/issues
- npm.io page: https://npm.io/package/map-promised

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2017-09-11
- 0.1.0 — 2017-09-11
- 0.0.7 — 2017-09-11
- 0.0.6 — 2017-09-03
- 0.0.5 — 2017-08-22
- 0.0.4 — 2017-08-22
- 0.0.3 — 2017-08-22
- 0.0.2 — 2017-08-22
- 0.0.1 — 2017-08-22
- 0.0.0 — 2017-08-22

## README

# map-promised

[![NPM](https://nodei.co/npm/map-promised.png)](https://nodei.co/npm/map-promised/)

Convert a Map to a Promised Map.

```javascript
var MapPromised = require('map-promised');
// MapPromised(<source>)

var map = new MapPromised(new Map());
map.setup().then(() => {
  map.set('elon musk', 'he inspires the shit out of us');

  map.set('mars', 'a cold, dusty, shitstorm').then(() => {
    console.log('are you working on a sanitation system on mars?');
  });
  // 'are you working on a sanitation system on mars?'

  map.size.then((ans) => {
    console.log('toms: '+ans);
  });
  // toms: 2

  map.get('mars').then((ans) => {
    console.log('what plan? '+ans);
  });
  // what plan? a cold, dusty, shitstorm

  map.delete('mars').then(() => {
    console.log('we need toilets in mars');
  });
  // we need toilets in mars

  map.size.then((ans) => {
    console.log('toms now: '+ans);
  });
  // toms now: 1

  map.has('mars').then((ans) => {
    console.log('will you be going to mars? '+ans);
  });
  // will you be going to mars? false

  map.clear().then((ans) => {
    console.log('is this the end of this world?');
  });
  // is this the end of this world?
  // ...
});
```

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