Update README.md

This commit is contained in:
eryn L. K 2020-06-02 01:00:03 -04:00 committed by GitHub
parent 061c3a8659
commit 36b789e2b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ This Promise implementation attempts to satisfy these traits:
* Predictable timing
## Example
`Promise.async` returns synchronously.
`Promise.new` returns synchronously.
```lua
local HttpService = game:GetService("HttpService")
@ -29,7 +29,7 @@ local HttpService = game:GetService("HttpService")
-- A light wrapper around HttpService
-- Ideally, you do this once per project per async method that you use.
local function httpGet(url)
return Promise.async(function(resolve, reject)
return Promise.new(function(resolve, reject)
local ok, result = pcall(HttpService.GetAsync, HttpService, url)
if ok then