
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
@types/global-cache
Advanced tools
npm install --save @types/global-cache
This package contains type definitions for global-cache (https://github.com/ljharb/global-cache#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/global-cache.
// Type definitions for global-cache 1.2
// Project: https://github.com/ljharb/global-cache#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function clear(): void;
/**
* @example
* import * as cache from 'global-cache';
* import { strict as assert } from 'node:assert';
*
* const key = 'key';
* const value = {};
*
* cache.set(key, value);
* assert.equal(cache.has(key), true);
*
* cache.delete(key);
* assert.equal(cache.has(key), false);
*/
export function _delete(key: unknown): boolean;
export { _delete as delete };
/**
* @example
* import * as cache from 'global-cache';
* import { strict as assert } from 'node:assert';
*
* const key = 'key';
* const value = {};
* assert.equal(cache.get(key), undefined);
*
* cache.set(key, value);
* assert.equal(cache.get(key), value);
*/
export function get(key: Primitive): unknown;
/**
* @example
* import * as cache from 'global-cache';
* import { strict as assert } from 'node:assert';
*
* const key = 'key';
* const value = {};
* assert.equal(cache.has(key), false);
*
* cache.set(key, value);
* assert.equal(cache.has(key), true);
*/
export function has(key: Primitive): boolean;
/**
* @example
* import * as cache from 'global-cache';
* import { strict as assert } from 'node:assert';
*
* const key = 'key';
* const value = {};
* assert.equal(cache.has(key), false);
*
* cache.set(key, value);
* assert.equal(cache.has(key), true);
*/
export function set(key: Primitive, value: unknown): boolean;
export function setIfMissingThenGet<T>(key: Primitive, valueThunk: () => T): T;
export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
These definitions were written by BendingBender.
FAQs
TypeScript definitions for global-cache
The npm package @types/global-cache receives a total of 58 weekly downloads. As such, @types/global-cache popularity was classified as not popular.
We found that @types/global-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.