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

moderndash

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moderndash - npm Package Compare versions

Comparing version 0.12.3 to 0.12.4

20

dist/index.d.ts

@@ -323,12 +323,12 @@ /**

type GenericFunction<TFunc extends (...args: any) => void> = (...args: Parameters<TFunc>) => ReturnType<TFunc>;
type GenericFunction<TFunc extends (...args: any) => any> = (...args: Parameters<TFunc>) => ReturnType<TFunc>;
/**
* Creates a function that memoizes the result of `func`.
* The cache key is either determined by the provided resolver or by the arguments used in the memoized function.
* Creates a function that caches the result of `func`.
*
* The cache is exposed as the `cache` property on the memoized function.
* Its creation may be customized by replacing the `memoize.cache` value.
* The new cache must implement `get` and `set` methods like the built-in `Map` constructors.
* The cache key is either determined by the provided `resolver` or by the arguments used in the cached function.
*
* The `cache` property is exposed on the cached function. It is an instance of `Map` and can be used to clear or inspect the cache.
* The cache property can be replaced by a custom cache as long as it implements the `Map` interface.
*
* **Options:**

@@ -354,8 +354,6 @@ * - `resolver` A function that determines the cache key for storing the result based on the arguments provided.

*
* // Replace `memoize.cache`.
* values.cache = new WeakMap()
*
* // Cached values are exposed as the `cache` property.
* values.cache.get(object)
* values.cache.set(object, ['a', 'b'])
* values.cache.clear()
*

@@ -371,4 +369,4 @@ * // This is the default way to create cache keys.

*/
declare function memoize<TFunc extends GenericFunction<TFunc>, Cache extends Map<string | symbol, [ReturnType<TFunc>, number]>>(func: TFunc, options?: {
resolver?: (...args: Parameters<TFunc>) => string | symbol;
declare function memoize<TFunc extends GenericFunction<TFunc>, Cache extends Map<string, [ReturnType<TFunc>, number]>>(func: TFunc, options?: {
resolver?: (...args: Parameters<TFunc>) => string;
ttl?: number;

@@ -375,0 +373,0 @@ }): TFunc & {

@@ -293,3 +293,3 @@ // src/array/chunk.ts

// src/decorator/decMemonize.ts
// src/decorator/decMemoize.ts
function decMemoize(options = {}) {

@@ -296,0 +296,0 @@ return toDecorator(memoize)(options);

@@ -54,3 +54,3 @@ {

},
"version": "0.12.3"
"version": "0.12.4"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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