From abec290a61c83a79d3279dae1de03609c520047e Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 7 Mar 2017 19:09:55 +0700 Subject: [PATCH] Don't use newline for .then on small code examples --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f111588..96672b4 100644 --- a/README.md +++ b/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: