New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

getorset-anything

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getorset-anything - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

4

dist/types/index.d.ts

@@ -15,3 +15,3 @@ declare type KeyOfMap<M extends Map<unknown, unknown>> = M extends Map<infer K, unknown> ? K : never;

*/
export declare function mapGetOrSet<M extends Map<unknown, unknown>>(map: M, key: KeyOfMap<M>, initialValue: () => ValueOfMap<M>): ValueOfMap<M>;
export declare function mapGetOrSet<M extends Map<unknown, unknown>, T extends () => ValueOfMap<M>>(map: M, key: KeyOfMap<M>, initialValue: T): ReturnType<T>;
/**

@@ -29,3 +29,3 @@ * Retrieve the value in an object, or if it wasn't found, set an initial value and return that.

*/
export declare function objGetOrSet<O extends Record<string | number | symbol, unknown>>(obj: O, key: keyof O, initialValue: () => O[keyof O]): O[keyof O];
export declare function objGetOrSet<O extends Record<string | number | symbol, unknown>, T extends () => O[keyof O]>(obj: O, key: keyof O, initialValue: T): ReturnType<T>;
export {};
{
"name": "getorset-anything",
"version": "0.0.2",
"version": "0.0.3",
"sideEffects": false,

@@ -5,0 +5,0 @@ "type": "module",

@@ -41,3 +41,2 @@ # Get or Set Anything 🐊

const map = new Map<string, number[]>()

@@ -55,3 +54,2 @@

const obj: Record<string, number[]> = {}

@@ -58,0 +56,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc