p-syncy
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

p-syncy Travis CI Build Status

Resolve a promise synchronously.

NPM Badge

Install

npm install p-syncy

Usage

const pSyncy = require("p-syncy");
const got = require("got");

const { body } = pSyncy(got("https://google.com"));

console.log(body)
//=> "<!doctype html>..."

const result = pSyncy(async () => {
	return "Hello World!"
})

console.log(result)
//=> "Hello World!"

API

pSyncy(promise)

promise

Type: promise or function returning promise

The promise to resolve.

Package Sidebar

Install

npm i p-syncy

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.31 kB

Total Files

6

Last publish

Collaborators

  • richienb