phanpy/src/utils/mem.js

6 lines
122 B
JavaScript
Raw Normal View History

2023-10-14 20:33:40 +08:00
import moize from 'moize';
export default function mem(fn, opts = {}) {
return moize(fn, { ...opts, maxSize: 100 });
}