From 469fefee9266756da532d95b3ae1a83830a9b71c Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Tue, 9 May 2017 15:51:45 -0700 Subject: [PATCH] Docs: Require Node 6.9.0, update boilerplate to avoid destructuring assign --- docs/index.md | 23 ++++++++--------------- docs/src/boilerplate.md.ejs | 20 +++++++------------- docs/src/offline.md.ejs | 3 +-- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5ac50859..603e89c0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -93,7 +93,7 @@ RippleAPI only provides access to *validated*, *immutable* transaction data. Use the following [boilerplate code](https://en.wikipedia.org/wiki/Boilerplate_code) to wrap your custom code using RippleAPI. ```javascript -const {RippleAPI} = require('ripple-lib'); +const RippleAPI = require('ripple-lib').RippleAPI; const api = new RippleAPI({ server: 'wss://s1.ripple.com' // Public rippled server hosted by Ripple, Inc. @@ -116,9 +116,9 @@ api.connect().then(() => { }).catch(console.error); ``` -RippleAPI is designed to work in [NodeJS](https://nodejs.org) (version `0.12.0` or greater) using [Babel](https://babeljs.io/) for [ECMAScript 6](https://babeljs.io/docs/learn-es2015/) support. +RippleAPI is designed to work in [Node.js](https://nodejs.org) version **6.9.0** or later. RippleAPI may work on older Node.js versions if you use [Babel](https://babeljs.io/) for [ECMAScript 6](https://babeljs.io/docs/learn-es2015/) support. -The code samples in this documentation are written in ES6, but `RippleAPI` will work with ES5 also. Regardless of whether you use ES5 or ES6, the methods that return promises will return [ES6-style promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). +The code samples in this documentation are written with ECMAScript 6 (ES6) features, but `RippleAPI` also works with ECMAScript 5 (ES5). Regardless of whether you use ES5 or ES6, the methods that return Promises return [ES6-style promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).