Skip to content

Commit

Permalink
Remove ES6 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
mnaughto committed Nov 18, 2015
1 parent 6334e09 commit b0e1fb0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lib/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module.exports = function flagpoleHook(sails) {

let moduleUtils = require('./utils/module-utils');
let _ = require('lodash');
var moduleUtils = require('./utils/module-utils');
var _ = require('lodash');

return {

Expand All @@ -25,7 +25,7 @@ module.exports = function flagpoleHook(sails) {
},

loadModules: function (cb) {
let hook = this;
var hook = this;
moduleUtils.loadResponses(sails, function loadedflagpoleResponseModules(err, responseDefs) {
if (err) return cb(err);
// Register responses as middleware
Expand Down
10 changes: 5 additions & 5 deletions lib/utils/model-utils.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

let pluralize = require('pluralize');
var pluralize = require('pluralize');

// Only attributes which are not primary key ('id') or have an alias (relationship)
exports.getOwnAttributes = function (Model) {
let ownAttrs = [];
var ownAttrs = [];
Object.keys(Model.definition).forEach(function (key) {
if (!Model.definition[key].primaryKey && !Model.definition[key].alias) {
ownAttrs.push(key);
Expand All @@ -24,7 +24,7 @@ exports.getRef = function (Model, cb) {

// Only strips primary key ('id')
exports.getAttributes = function (Model) {
let attrs = [];
var attrs = [];
Object.keys(Model._attributes).forEach(function (key) {
if (!Model._attributes[key].primaryKey) {
attrs.push(key);
Expand All @@ -40,9 +40,9 @@ exports.getModelName = function (req) {

// Returns singular-ized model names of related models
exports.getRelatedModelNames = function (req) {
let rels = [];
var rels = [];
req.options.associations.forEach(function (assoc) {
let model = pluralize(assoc.alias, 1);
var model = pluralize(assoc.alias, 1);
rels.push(model);
});
return rels;
Expand Down
6 changes: 3 additions & 3 deletions lib/utils/module-utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

let buildDictionary = require('sails-build-dictionary');
let path = require('path');
let _ = require('lodash');
var buildDictionary = require('sails-build-dictionary');
var path = require('path');
var _ = require('lodash');

function bindToSails(sails, cb) {
return function (err, modules) {
Expand Down

0 comments on commit b0e1fb0

Please sign in to comment.