Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Commit 3d1cd0e

Browse files
committed
Replace var with let
1 parent 8e7e785 commit 3d1cd0e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# sequelize-lazy-migrations
22

3-
Migration generator & runner for sequelize
3+
Migration generator & runner for sequelize
44

55
This package provide two tools:
66
* `makemigration` - tool for create new migrations

lib/migrate.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,9 @@ const parseDifference = function(previousState, currentState)
538538

539539

540540
function shuffleArray(array) {
541-
for (var i = array.length - 1; i > 0; i--) {
542-
var j = Math.floor(Math.random() * (i + 1));
543-
var temp = array[i];
541+
for (leti = array.length - 1; i > 0; i--) {
542+
letj = Math.floor(Math.random() * (i + 1));
543+
lettemp = array[i];
544544
array[i] = array[j];
545545
array[j] = temp;
546546
}
@@ -760,7 +760,7 @@ let res = `{ fn: "removeIndex", params: [
760760

761761
const writeMigration = function(revision, migration, migrationsDir, name = '', comment = '')
762762
{
763-
let _commands = "var migrationCommands = [ \n" + migration.commandsUp.join(", \n") +' \n];\n';
763+
let _commands = "letmigrationCommands = [ \n" + migration.commandsUp.join(", \n") +' \n];\n';
764764
let _actions = ' * ' + migration.consoleOut.join("\n * ");
765765

766766
_commands = beautify(_commands);
@@ -773,7 +773,7 @@ const writeMigration = function(revision, migration, migrationsDir, name = '', c
773773

774774
let template = `'use strict';
775775
776-
var Sequelize = require('sequelize');
776+
letSequelize = require('sequelize');
777777
778778
/**
779779
* Actions summary:
@@ -782,15 +782,15 @@ ${_actions}
782782
*
783783
**/
784784
785-
var info = ${JSON.stringify(info, null, 4)};
785+
letinfo = ${JSON.stringify(info, null, 4)};
786786
787787
${_commands}
788788
789789
module.exports = {
790790
pos: 0,
791791
up: function(queryInterface, Sequelize)
792792
{
793-
var index = this.pos;
793+
letindex = this.pos;
794794
return new Promise(function(resolve, reject) {
795795
function next() {
796796
if (index < migrationCommands.length)

0 commit comments

Comments
 (0)