Skip to content

Commit

Permalink
Merge pull request #11 from TransitApp/ilias/change-to-anonymous-func…
Browse files Browse the repository at this point in the history
…tion

[ fix ] unnecessary named functions
  • Loading branch information
iliasbhal committed Sep 21, 2018
2 parents 37529ce + 4660043 commit b192c8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions helpers/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function createGtfsClassForKeys(sortedKeys) {
};

// eslint-disable-next-line func-names
GtfsRow.prototype.clone = function clone() {
GtfsRow.prototype.clone = function () {
const newRow = new GtfsRow(JSON.parse(JSON.stringify(this.v)));

for (const key of Object.keys(this)) {
Expand All @@ -195,7 +195,7 @@ function createGtfsClassForKeys(sortedKeys) {
};

// eslint-disable-next-line func-names
GtfsRow.prototype.toSimpleObject = function clone() {
GtfsRow.prototype.toSimpleObject = function () {
const jsonObj = {};

// eslint-disable-next-line
Expand All @@ -214,7 +214,8 @@ function createGtfsClassForKeys(sortedKeys) {
return jsonObj;
};

GtfsRow.prototype.toJSON = function clone() {
// eslint-disable-next-line func-names
GtfsRow.prototype.toJSON = function () {
return JSON.stringify(this.toSimpleObject());
};

Expand All @@ -237,4 +238,4 @@ function createGtfsClassForKeys(sortedKeys) {
exports.createGtfsObjectFromSimpleObject = (obj) => {
const GtfsRow = createGtfsClassForKeys(Object.keys(obj));
return new GtfsRow(Object.values(obj));
};
};

0 comments on commit b192c8c

Please sign in to comment.