Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moize

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moize - npm Package Versions

13
11

6.0.3

Diff

Changelog

Source

6.0.3

  • #153 - Fix ESM/CommonJS cross-compatibility issues in NextJS
planttheidea
published 6.0.2 •

Changelog

Source

6.0.2

  • Update dependencies to latest (fast-equals in particular to prevent surfacing of an issue it faced)
planttheidea
published 6.0.1 •

Changelog

Source

6.0.1

  • #146 - Fix reading deprecated properties on function object
planttheidea
published 6.0.0 •

Changelog

Source

6.0.0

BREAKING CHANGES

  • moize v5 and below had a default cache size of Infinity, however starting with v6 the default cache size will be 1. If you want to maintain a cache history of multiple entries, it is recommended to use moize.maxSize to set the size of history desired. To replicate usage from v5 and below, use moize.infinite.
  • isReact option and moize.react shorthand method now memoizes on a per-instance basis (previously shared cache across all instances).
  • moize.simple and moize.reactSimple have been removed due to default cache size being 1.
  • isSerialized option and moize.serialize shorthand method will now serialize functions by default.
  • shouldSerializeFunctions option has been removed, as serializing functions is now the default.
  • equals option has been renamed to matchesArg for alignment with matchesKey.

ENHANCEMENTS

  • New options:
    • isShallowEqual (compares each arg in the key based on shallow equality)
    • updateCacheForKey (if truthy value returned, will update the cached value for the given key)
  • New shorthand methods:
    • moize.infinite (shorthand for maxSize option set to Infinity)
    • moize.matchesArg (shorthand for matchesArg option)
    • moize.matchesKey (shorthand for matchesKey option)
    • moize.serializeWith (shorthand for isSerialized and serializer option)
    • moize.shallow (shorthand for isShallowEqual option)
    • moize.transformArgs (shorthand for transformArgs option)
    • moize.updateCacheForKey (shorthand for updateCacheForKey option)

INTERNALS

  • Rewritten in TypeScript, with much better type declarations.
  • Changed unit test framework to jest
  • Used latest external dependencies for better ESM support in Node 14
planttheidea
published 6.0.0-beta.5 •

planttheidea
published 6.0.0-beta.4 •

planttheidea
published 6.0.0-beta.3 •

planttheidea
published 6.0.0-beta.2 •

planttheidea
published 6.0.0-beta.1 •

planttheidea
published 6.0.0-beta.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