# get-async **Repository Path**: mirrors_yiminghe/get-async ## Basic Information - **Project Name**: get-async - **Description**: get something asynchronously without repetition - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-14 - **Last Updated**: 2026-03-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # get-async get something asynchronously without repetition ## usage ```js import getAsync from 'get-async'; let called = 0; function getTimer() { called++; return new Promise(resolve => { setTimeout(() => { resolve(called); }, 100); }); } const call1 = getAsync('timer', getTimer); const call2 = getAsync('timer', getTimer); const ret = await Promise.all([call1, call2]); expect(ret).toMatchInlineSnapshot(` Array [ 1, 1, ] `); expect(called).toBe(1); ```