Browse Source

doc: fix README

tags/v0.11.0
Muthu Kumar 2 years ago
parent
commit
79125adb66
Failed to extract signature
  1. 13
      README.md

13
README.md

@ -11,9 +11,8 @@ npm install --save @codefeathers/promise.object
## Usage ## Usage
```TS ```TS
import { promiseObject } from "@codefeathers/promise.object"; import promiseObject from "@codefeathers/promise.object";
// --
const resolved = await Promise.object({ const resolved = await Promise.object({
foo: Promise.resolve(5), foo: Promise.resolve(5),
bar: { bar: {
@ -28,10 +27,8 @@ console.log(resolved);
We need to go _deeper_! We need to go _deeper_!
```JavaScript ```JavaScript
Promise.object = require('@codefeathers/promise.object'); import promiseObject from "@codefeathers/promise.object";
const { log } = console;
// --
const resolved = await Promise.object( const resolved = await Promise.object(
Promise.resolve({ Promise.resolve({
foo: Promise.resolve({ foo: Promise.resolve({
@ -44,6 +41,12 @@ console.log(resolved);
//-> { foo: { bar: 5 } } //-> { foo: { bar: 5 } }
``` ```
## Deno
```TS
import promiseObject from "https://deno.land/x/promise_object@v0.10.0";
```
## Credits ## Credits
The original idea and challenge was from [@TRGWII](https://github.com/TRGWII). The original idea and challenge was from [@TRGWII](https://github.com/TRGWII).

Loading…
Cancel
Save