Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor remaining 'var' to 'let/const' usages #959

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Webhook = {
opts.secret
);

var generatedHeader = [
const generatedHeader = [
't=' + opts.timestamp,
opts.scheme + '=' + opts.signature,
].join(',');
Expand Down
3 changes: 2 additions & 1 deletion lib/makeRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ function getRequestOpts(self, requestArgs, spec, overrideData) {

function makeRequest(self, requestArgs, spec, overrideData) {
return new Promise((resolve, reject) => {
let opts;
try {
var opts = getRequestOpts(self, requestArgs, spec, overrideData);
opts = getRequestOpts(self, requestArgs, spec, overrideData);
} catch (err) {
reject(err);
return;
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const utils = (module.exports = {
/**
* Outputs a new function with interpolated object property values.
* Use like so:
* var fn = makeURLInterpolator('some/url/{param1}/{param2}');
* const fn = makeURLInterpolator('some/url/{param1}/{param2}');
* fn({ param1: 123, param2: 456 }); // => 'some/url/123/456'
*/
makeURLInterpolator: (() => {
Expand Down
4 changes: 2 additions & 2 deletions test/resources/BalanceTransactions.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

var stripe = require('../../testUtils').getSpyableStripe();
var expect = require('chai').expect;
const stripe = require('../../testUtils').getSpyableStripe();
const expect = require('chai').expect;

describe('BalanceTransactions Resource', function() {
describe('retrieve', function() {
Expand Down
4 changes: 2 additions & 2 deletions test/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ describe('utils', () => {
it('handles being unable to require `child_process`', () => {
utils._exec = null;

var actualErr = null;
var actualRes = null;
let actualErr = null;
let actualRes = null;
function myCb(err, res) {
actualErr = err;
actualRes = res;
Expand Down