Skip to content

Releases: ressurectit/js-common

v7.4.1

Choose a tag to compare

@kukjevov kukjevov released this 16 Sep 08:25

Bug Fixes

  • fixed package to no longer use a barrel file for CycleSafeReplacerOptions interface export, which caused a crash under Node

v7.4.0

Choose a tag to compare

@kukjevov kukjevov released this 16 Sep 07:09

Bug Fixes

  • fixed cycleSafeReplacer function, now correctly detects only real circular references (same object repeated on its own path), shared references are no longer marked as [Circular]
  • fixed cycleSafeReplacer function, now limits depth of serialization and skips DOM nodes (replaced with [NODE_NAME] marker), which prevents Maximum call stack size exceeded/too much recursion errors when serializing deep object graphs (for example angular components)
  • fixed formatString function, {{@...}} placeholders no longer fail with too much recursion on deep object graphs

Features

  • new CycleSafeReplacerOptions interface, that allows customization of cycleSafeReplacer
    • maxDepth - maximal depth of nested objects that will be serialized, deeper objects are replaced with [MaxDepth] marker, defaults to 10
    • plainObjectsOnly - indication whether serialize only plain objects and arrays, class instances are replaced with [ClassName] marker, defaults to false
  • updated cycleSafeReplacer function, now accepts optional CycleSafeReplacerOptions

v7.3.0

Choose a tag to compare

@kukjevov kukjevov released this 14 Aug 12:17

Features

  • new eventDispatchesNativeClick function, that checks whether keyboard event dispatches native click on element, allows skipping of duplicated handling of both events

v7.2.0

Choose a tag to compare

@kukjevov kukjevov released this 13 Aug 06:34

Features

  • new cycleSafeReplacer function, that creates JSON.stringify replacer that replaces already visited objects with a marker, and handles circular references
  • updated formatString function, now handles circular references when serializing values using {{@...}} placeholders

v7.1.1

Choose a tag to compare

@kukjevov kukjevov released this 22 Jul 12:17

Bug Fixes

  • fixed RecursivePartial type, now correctly handles Map, Set, ReadonlyArray, and builtins (Function, Date, Error, RegExp) without recursing into them and losing type information

v7.1.0

Choose a tag to compare

@kukjevov kukjevov released this 15 Jul 08:34

Features

  • new deepCopyWithArrayOverride overloads for up to nine parameters

v7.0.0

Choose a tag to compare

@kukjevov kukjevov released this 16 Jan 13:06

Features

  • new subpackage @jscrpt/common/lodash
    • new optional dependency lodash-es package
  • subpackage @jscrpt/common/lodash
    • new deepCopyWithArrayOverride function, which performs deep copy of object with arrays that are not merged but overrided with latest value

BREAKING CHANGES

  • utility method extend moved into subpackage @jscrpt/common/extend
    • extend package dependency is now optional

v6.2.1

Choose a tag to compare

@kukjevov kukjevov released this 31 Jul 08:44

Bug Fixes

  • fixed validHtmlId function, now correctly creates valid HTML id

v6.2.0

Choose a tag to compare

@kukjevov kukjevov released this 29 Jul 12:32

Features

  • new Mutable type, that returns a mutable type version of type.
  • new Writable type, that returns a writable type version of type.

v6.1.0

Choose a tag to compare

@kukjevov kukjevov released this 29 May 05:02
  • new subpackage @jscrpt/common/numeral
    • 'assimilated' library numeral.js and updated to 'module' package