Browse Source

Don't use newline for .then on small code examples

pull/13/head
Luke Childs 8 years ago
parent
commit
abec290a61
  1. 6
      README.md

6
README.md

@ -34,8 +34,7 @@ or for quick testing:
```js
import whenDomReady from 'when-dom-ready';
whenDomReady()
.then(() => console.log('DOM is ready yo!'));
whenDomReady().then(() => console.log('DOM is ready yo!'));
```
You can still use callbacks if you want to:
@ -69,8 +68,7 @@ const whenDomReady = require('when-dom-ready');
const doc = jsdom.jsdom('').defaultView.document;
whenDomReady(doc)
.then(() => console.log('DOM is ready yo!'));
whenDomReady(doc).then(() => console.log('DOM is ready yo!'));
```
Again, you can use the callback version as a pure function too:

Loading…
Cancel
Save