# a-sync

> Make sync functions a?sync

Latest version **0.0.0** (published 2014-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install a-sync
pnpm add a-sync
yarn add a-sync
bun add a-sync
```

## 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.0.0 |
| Published | 2014-06-07 |
| First published | 2014-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | fritx |
| Keywords | sync, async, nodeify |

## Links

- npm: https://www.npmjs.com/package/a-sync
- Repository: git@github.com:fritx/a-sync
- Homepage: https://github.com/fritx/a-sync
- Issues: https://github.com/fritx/a-sync/issues
- npm.io page: https://npm.io/package/a-sync

## 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.0.0 (latest) — 2014-06-07

## README

# a-sync

> Make sync functions a?sync

## Usage

```js
var as = require('a-sync')
var assert = require('assert')

var plus1 = as(function(num){
  if (typeof num !== 'number')
  return num + 1
})

// sync way
assert.equal(plus1(1), 2)
assert.throws(function(){
  plus1('a')
})

// async way
plus1(1, function(err, res){
  assert.equal(res, 2)
})
plus1('a', function(err, res){
  assert.notEqual(err, null)
})
```

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