Releases: metarhia/common
Releases · metarhia/common
Version 2.2.2
PR-URL: https://github.com/metarhia/common/pull/376
Version 2.2.1
PR-URL: https://github.com/metarhia/common/pull/374
Version 2.2.0
Release summary:
Applied fixes and improvements to the API, added multiple utility methods to
the Iterator API and several utility functions, added table of contents to the
documentation.
Changelog:
Added
- A way to limit the internal buffer size of
MemoryWritable
stream. common.mkdirpPromise()
function.Iterator#apply()
andIterator#chainApply()
to improve iterator
interaction with chained calls.captureMaxStack()
utility to get maximum available stack trace.- Table of contents to documentation.
- Get random element from array:
sample(array)
. - ECMAScript Modules named exports support.
Iterator#min()
,Iterator#max()
, andIterator#findCompare()
to
simplify consumption of iterator in common use-cases
(finding minimum, maximum, or using a custom condition appropriately).Iterator#partition()
to allow splitting iterator values into
multiple arrays.Iterator.zip()
- static method for zipping iterators.Iterator#groupBy()
to group iterator value into Map by
specific keys.
Changed
cryptoPrefetcher()
to throw whenbufSize
is not a multiple of
valueSize
.MemoryWritable
internal buffer size is now limited to 8 MB by default.- Signature of
callerFilepath()
to allow passingRegExp
as depth to be used
for filtering of stack frames. - Return value of
cryptoPrefetcher()
now implements the Iterable interface.
Fixed
common.subst()
behavior for @.value@ variables.common.callerFilepath()
working incorrectly on paths with colon in them.
Version 2.0.0
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
'scompliance
number property instead of
strength
string. - Replaced ES5-style classes and inheritance with ES6 classes for
Cache
and
EnhancedEmitter
. - Signature of
merger()
inmergeObjects()
to also contain the merging key.
Removed
- Dropped support for Node.js 6.
- Outdated
inherits()
method (in favor ofutil.inherits()
available in
Node.js). - Multiple deprecated functions:
common.ip2int()
- replace withcommon.ipToInt()
common.cb()
- replace withcommon.once()
common.extractCallback()
- replace withcommon.unsafeCallback()
common.cbUnsafe()
- replace withcommon.unsafeCallback()
common.cbExtract()
- replace withcommon.safeCallback()
common.crcSID()
- replace withcommon.crcToken()
common.generateSID()
- replace withcommon.generateToken()
common.validateSID()
- replace withcommon.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.