Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
divmain committed Feb 18, 2016
1 parent 648877a commit d0d0f5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
};
},

getStyles(style, defaultStyles, height, width) {
getStyles(style, defaultStyles, height, width) { // eslint-disable-line max-params
if (!style) {
return merge({}, defaultStyles, { parent: { height, width } });
}
Expand Down
8 changes: 4 additions & 4 deletions src/perf.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export function memoize (fn) {
export const memoize = function (fn) {
const cache = {};
return function () {
const args = Array.prototype.slice.call(arguments);
const hash = args.map(arg => {
const hash = args.map((arg) => {
return (typeof arg === "string" || typeof arg === "number") ? arg : JSON.stringify(arg);
}).join("~");
return hash in cache ?
cache[hash] :
cache[hash] = fn.apply(this, args);
cache[hash] = fn.apply(this, args); // eslint-disable-line no-invalid-this
};
}
};

0 comments on commit d0d0f5c

Please sign in to comment.