Skip to content

Commit

Permalink
Merge pull request #1 from Twipped/release-please--branches--main--co…
Browse files Browse the repository at this point in the history
…mponents--utils

chore(main): release 6.1.0
  • Loading branch information
Twipped authored Aug 30, 2022
2 parents a2a854a + ecb544a commit dfc75f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 205 deletions.
208 changes: 6 additions & 202 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,209 +1,13 @@
# Changelog

6.0.0 / 2022-04-23
==================
## [6.1.0](https://github.com/Twipped/js-utils/compare/v6.0.0...v6.1.0) (2022-08-30)

feat: Most functions are now available as direct subpath imports (eg, `@twipped/utils/entries`)

feat: `omit` can now filter strings.
### Features

feat: `empty` now supports numbers, dates and booleans.
* **pDebounce:** Added promise aware debounce function. ([e8ec88f](https://github.com/Twipped/js-utils/commit/e8ec88f38cfa6746bb543220f8960e8e2748cb5c))

feat: `includes` now supports strings.

feat: `anyOf`, `allOf` and `noneOf`: Passing objects as criteria will new treat the object as an iteratee matching object predicate. If the object has a `$` key, then the value of that key will instead be used for the iteratee predicate
### Bug Fixes

feat: New function `delimit` to handle creation of delimited arrays

feat: Added `resolveRef`, a react utility function for resolving a passed value that may be a ref.

BREAKING CHANGE: All promise functions are now camel case (eg: ptry is not pTry)

BREAKING CHANGE: pdefer and pdelay now support passing an AbortController signal.

BREAKING CHANGE: truthy and falsy have replaced isTruthy and isFalsy

BREAKING CHANGE: The old isTruthy and isFalsey have been removed.

BREAKING CHANGE: `compare` has been deleted in favor of `equal`

BREAKING CHANGE: `transcriber` has been deleted in favor of `mapper`

BREAKING CHANGE: `deepPick` has been deleted in favor of `mapper`

BREAKING CHANGE: `pathinate` has been deleted.

BREAKING CHANGE: `join` no longer handles delimitation of collections, it now only joins into strings

BREAKING CHANGE: `arrayify` has been deleted. The purpose of this function was never very clear, and it's behavior ambiguous.

BREAKING CHANGE: `mapTable` has been deleted.

fix: Minor speed improvement to `first` when length is 1

fix: `pcoalesce` now uses isTruthy and will skip over invalid dates.

fix: `preduce` now behaves correctly when an initial value is omitted.

fix: Fixed numerous issues with `get`, `set` and `has`. All three now support bracket (eg: `[4]`) syntax in path queries.

5.0.1 / 2021-12-20
==================

- Fix: Distance conversions will no longer be falsely included during tree-shaking

5.0.0 / 2021-12-20
==================

- Breaking Change: Now uses Node 12/14 `exports` package structure. As such, the rollup builds are no longer included.
- New: `clamp` now supports an extra argument for rounding to a step value.
- New: `round` for rounding to a nearest value.
- Fix: `floor` and `ceil` are now more reliable when rounding to a nearest value.
- Fix: `EventEmitter` no longer crashes if there are no listeners for an event.

4.2.0 / 2021-10-25
==================

- New: `pcoalesce` will resolve first promise that resolves a truthy value, ignoring rejections
- New: `quicksort` is now exposed for usage
- New: `sorter` now supports deep property paths
- New: `hash` is a very rudimentary function for generating a hash integer from a string
- New: `mapper` is a utility for converting objects between schema
- New: `similarity` performs a comparison between two strings and returns a value between 0 and 1 indicating how close they are.
- Fix: `prace` now handles arrays of promises
- Fix: `uniq` now actually works right on objects
- Fix: `isNumeric` now detects floats
- Fix: `ucsentence`, `ucwords`, `camelToHyphen`, `camelToSnake` and `camelToUpperSnake` now coerce their inputs to strings.


4.1.0 / 2021-08-12
==================

- Fixed a huge bug where `equal` would incorrectly report two objects as the same.
- `warn` and `warning` no longer default to console.trace and instead always use console.error.
- `mapValues` can now accept the same kinds of predicates as all other collection functions.
- `filter` now supports objects and maps, returning the same type that was provided.

- New Features
- `EventEmitter` is now available as a base class. This is a barebones implementation of the NodeJS EventEmitter class.
- `threepiece` iterates over a collection with a predicate function, providing both the previous and next values along with the iterated item.

4.0.0 / 2021-07-02
==================

- Now works directly from source in Node 14.
- Fixed bug with `entries` starting at index 1 when iterating Sets
- `entries`, `values` and `keys` now always return iterators. Object iteration is faster and smarter.
- Fixed crash in `catcher`
- `distance` is now case insensitive. Added the `sf` unit to feet.
- `mapMode` now supports strings, and the `MAPMODE_STRING` constant has been added.
- `range` now supports an optional third argument for defining a step size
- Fixed `equal`, `shallowEqual` and `deepEqual` treating non-numeric strings as identical when they aren't.
- `sorter` and `sort` now support functions in arrays, and deep targeting keys as predicate options.

- Breaking Changes
- `hasOwn` is now part of the `isType` module.
- `clone`, `merge`, `collect`, `get`, `set` and `has` now live in a new `objects` module.

- New Features
- `join` concatenates arrays using a delimiter
- `iterateObject` produces entries, keys or values one property at a time (instead of producing an array first)
- `empty` quickly determines if a collection (including objects) is empty. Supports a truthy second argument to ignore undefined values.
- `floor` and `ceil`, which support a step value to round to (eg, floor to nearest 50)
- `isBetween` and `isNotBetween` for comparing numeric values.
- `warn` to send errors to console in non-production environments.
- `DEFAULT` has been added as a generic use Symbol
- `MultiMap` is a hashmap class which supports using arrays of values for deep key assignment.
- `memoize` is a promise-aware function memoization utility.


3.0.0 / 2021-04-19
==================

- Breaking Changes
- isArrayOfArrays is now correctly capitalized
- `assert.fail` is now `fail`
- `assert.isArray` is now `assertIsArray`
- `assert.isObject` is now `assertIsObject`
- `assert.isPlainObject` is now `assertIsPlainObject`
- `assert.isString` is now `assertIsString`
- `assert.isNumber` is now `assertIsNumber`

- isArrayOf functions should now be tree shaken properly.

- New Functions
- `chunkIterable` Takes an iterable and clusters its output into arrays of a provided length. Defaults to pairs
- `median` Provides the median average of a list of values.

2.1.0 / 2021-04-07
==================

- Fixes:
- `entries` now provides an iterator for objects instead of an array
- Added optimization to `uniq` when doing a simple array reduction
- `marshall` was really messing up with unmapped keys. Now puts them into a catchall bucket defined by third argument.
- rewrote `first` to lean on `entries` for faster speed
- Fixed issues with `intersect` and `difference`
- `gt` and `lt` now coerce undefined and null to 0 and attempt to coerce objects

- New Functions:
- `camelToHyphen`
- `camelToSnake`
- `camelToUpperSnake`
- qsa
- hasClassName
- addClassName
- removeClassName
- distance
- includes
- chain
- series

2.0.0 / 2021-02-28
==================

- **Breaking Changes**:
- Internal structure has been separated into multiple modules.
- Now requires node 12 for commonjs build
- `sorter` and `sort` now attempt to coerce objects to sortable values via `.valueOf` or `.toString`

- New Functions:
- `noop`
- `clRemap`
- `clamp`
- `defer`
- `timeout`
- `equal`
- `clone`
- `stripIndent`
- `isIterable`
- `isIterator`
- `isPromise`
- `mapTable`
- `entries`
- `nullIterator`
- `assert`
- `warning`
- `prace`
- `pdelay`
- `pdefer`
- `ptry`
- `pall`
- `pmap`
- `preduce`
- `catcher`
- `r`

- Fixes:
- Numerous functions are now date aware.
- shallowEqual and deepEqual both now derive from the `equal` function.
- `toPairs` can now take any collection.
- `fromPairs` now accepts an optional second argument to define the output type.
- `isArrayOf` no longer returns true for non-arrays.
- `marshal` now supports a marshalling object map as the second argument.



1.0.0 / 2020-12-29
==================

* Initial Release
* woops, didn’t include the index.js [release] ([3076c80](https://github.com/Twipped/js-utils/commit/3076c803c4ff6f575a5799493f88a4b3f914b765))
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@twipped/utils",
"version": "6.0.1",
"version": "6.1.0",
"description": "A collection of commonly used utility functions",
"type": "module",
"main": "./index.js",
Expand Down

0 comments on commit dfc75f0

Please sign in to comment.