UNPKG

lunify.js

Version:

A basic api wrapper for the spotify api covering the oauth routes.

21 lines 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CacheManager = void 0; class CacheManager extends Map { constructor() { super(); } /** * Finds a value in the cache that satisfies the predicate * @param fn The predicate function */ find(fn) { for (const [key, val] of this) { if (fn(val, key, this)) return val; } return undefined; } } exports.CacheManager = CacheManager; //# sourceMappingURL=index.js.map