Skip to content

Commit

Permalink
Drop support for Node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrayalex-stripe committed Dec 24, 2019
1 parent f6e5ad3 commit 09bb044
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cache:
directories:
- node_modules
node_js:
- '6'
- '8'
- '10'
sudo: false
Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ const stripe = Stripe('sk_test_...');
//
```

On older versions of Node, you can use [promises](#using-promises)
or [callbacks](#using-callbacks) instead of `async`/`await`.

## Initialize with config object

The package can be initialized with several options:
Expand Down Expand Up @@ -135,28 +132,6 @@ stripe.customers
});
```

### Using callbacks

On versions of Node.js prior to v7.9:

```js
var stripe = require('stripe')('sk_test_...');

stripe.customers.create(
{
email: '[email protected]',
},
function(err, customer) {
if (err) {
// Deal with an error (will be `null` if no error occurred).
}

// Do something with created customer object
console.log(customer.id);
}
);
```

### Configuring Timeout

Request timeout is configurable (the default is Node's default of 120 seconds):
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"bugs:": "https://github.com/stripe/stripe-node/issues",
"engines": {
"node": "^6 || ^8.1 || >=10.*"
"node": "^8.1 || >=10.*"
},
"main": "lib/stripe.js",
"devDependencies": {
Expand Down

0 comments on commit 09bb044

Please sign in to comment.