Skip to content

Version 2.0.0

Compare
Choose a tag to compare
@belochub belochub released this 26 Apr 12:20
· 59 commits to master since this release
5d763c0

Release summary:

Dropped support for Node.js 6, removed a bunch of deprecated and outdated methods, replaced remaining ES5-style classes with ES6 classes, and added changelog and utility methods for Iterator.

Changelog:

Added

  • CHANGELOG.md file.
  • Iterator#collectWith() now returns the provided object.
  • Iterator#toObject() to collect iterable into an Object similar to
    Object.fromEntries().
  • common.iterEntries(), common.iterKeys(), common.iterValues() utility
    methods.

Changed

  • Expose AuthenticationStrength's compliance number property instead of
    strength string.
  • Replaced ES5-style classes and inheritance with ES6 classes for Cache and
    EnhancedEmitter.
  • Signature of merger() in mergeObjects() to also contain the merging key.

Removed

  • Dropped support for Node.js 6.
  • Outdated inherits() method (in favor of util.inherits() available in
    Node.js).
  • Multiple deprecated functions:
    • common.ip2int() - replace with common.ipToInt()
    • common.cb() - replace with common.once()
    • common.extractCallback() - replace with common.unsafeCallback()
    • common.cbUnsafe() - replace with common.unsafeCallback()
    • common.cbExtract() - replace with common.safeCallback()
    • common.crcSID() - replace with common.crcToken()
    • common.generateSID() - replace with common.generateToken()
    • common.validateSID() - replace with common.validateToken()
  • Functions that can be replaced with util.deprecate() available in Node.js:
    • common.deprecate()
    • common.alias()

Fixed

  • Functions common.clone(), common.deleteByPath(), and
    common.mergeObjects() throwing when used on objects without prototype.