# vz.resolve

> Resolve operations that may be sync or async

Latest version **1.0.6** (published 2014-10-01) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install vz.resolve
pnpm add vz.resolve
yarn add vz.resolve
bun add vz.resolve
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2014-10-01 |
| First published | 2014-09-02 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Manuel Valls Fernández |
| Maintainers | manvalls |

## Links

- npm: https://www.npmjs.com/package/vz.resolve
- Repository: https://github.com/manvalls/vz.resolve
- Issues: https://github.com/manvalls/vz.resolve/issues
- npm.io page: https://npm.io/package/vz.resolve

## Dependencies (2)

- [vz.property](https://npm.io/package/vz.property.md)
- [vz.next-tick](https://npm.io/package/vz.next-tick.md)

## Recent versions

- 1.0.6 (latest) — 2014-10-01
- 1.0.5 — 2014-10-01
- 1.0.4 — 2014-09-09
- 1.0.3 — 2014-09-09
- 1.0.2 — 2014-09-04
- 1.0.1 — 2014-09-04
- 1.0.0 — 2014-09-02

## README

# vz resolve

**DEPRECATED in favour of [vz.yielded](https://www.npmjs.org/package/vz.yielded "vz.yielded")**

[![NPM](https://nodei.co/npm/vz.resolve.png?downloads=true)](https://nodei.co/npm/vz.resolve/)

No piece of software is ever completed, feel free to contribute and be humble

## Sample usage:

```javascript

var resolve = require('vz.resolve'),
    nextTick = require('vz.next-tick'),
    result;

result = resolve(function solve(){
  if(Math.random() < 0.5) this.resolve('Hello world');
  else nextTick(solve,[],this);
},function(data){
  console.log('Received asynchronously:',data);
});

if(result != resolve.deferred) console.log('Received synchronously:',result);

```
## Reference

### resolve(function[,arguments],callback[,thisArg])

This function executes *function* with *arguments* or an empty array as arguments, and a new Resolver as the thisArg. If Resolver.resolve is called within *function*, then this function returns the value passed to that call, otherwise it returns resolve.deferred, a unique object representing that the task could not be completed synchronously, and executes *callback* with *thisArg* as thisArg when Resolver.resolve is called.

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