Skip to content

Commit

Permalink
Update test refs
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Dec 13, 2022
1 parent 0410a6c commit 95384ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/swc_ecma_minifier/tests/fixture/issues/6636/output.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function memo(getDeps, fn, opts) {
let result, deps = [];
return ()=>{
opts.key && opts.debug && Date.now();
const newDeps = getDeps(), depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index)=>deps[index] !== dep);
return depsChanged && (deps = newDeps, opts.key && opts.debug && Date.now(), result = fn(...newDeps), opts?.onChange?.(result), opts.key && opts.debug && opts?.debug()), result;
};
}

0 comments on commit 95384ce

Please sign in to comment.