fd24924d10
feat: introduce objectRemap function
...
This commit introduces a new function `objectRemap` in `object-util` package. It takes an object as input and applies the provided mapping function to each key-value pair. It produces a new object with transformed keys and values.
The `objectRemap` function is more advanced than `objectMap` as it transforms an object back into another object. It works on objects and arrays. If multiple keys are the same, only the last value will be set by default, but enabling the `strict` option will throw an error if the same key is set twice.
This commit also updates the import statement in tests for this new function.
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-03-14 10:54:46 +01:00
7cc3ca98c1
fix: Add JSDocs returns for most functions that needed one
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-03-14 10:53:09 +01:00
d67c53d89d
feat(object-util): export BasicObjectKeys and BasicObject types
...
The `BasicObjectKeys` and `BasicObject` types are now exported for use outside of the module.
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-03-14 10:50:14 +01:00
c664af98ba
fix: Add tests to have a better array support
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-03-14 10:49:49 +01:00
9779e453f0
bump: Object-Util v1.4.6
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-02-22 16:32:20 +01:00
a1304e7349
fix: handle arrays with empty elements
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2023-02-22 16:31:52 +01:00
2528f5e1af
bump(object-util): Version 1.4.5
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-08 13:58:55 +01:00
ddb0a4820a
fix(object-util): Typescript outputing error when using object with undefined
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-08 13:58:41 +01:00
49f16223c3
bump(object-util): Version 1.4.4
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-08 13:46:32 +01:00
50855afe67
bump(object-util): 1.4.4 (Fixed export)
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-08 13:45:53 +01:00
6be80cb2e1
fix(object-util): Typing not being sent back to user
...
Signed-off-by: Avior <f.bouillon@aptatio.com>
2022-12-08 12:15:08 +01:00
f515091ac5
Updated tests and documentation to be more clear
...
Signed-off-by: Avior <github@avior.me>
2021-11-18 17:38:19 +01:00
ce264b2b8b
bump @dzeio/object-util
...
Signed-off-by: Avior <github@avior.me>
2021-09-29 17:17:13 +02:00
9f608a52fc
Fixed Object.freeze throwing error with objectOmit ( #46 )
...
Signed-off-by: Avior <github@avior.me>
2021-09-29 17:15:52 +02:00
7ce7daf751
Upgrade Jest to 27 ( #43 )
...
* test
Signed-off-by: Avior <github@avior.me>
* Fixed
Signed-off-by: Avior <github@avior.me>
* Fix
Signed-off-by: Avior <github@avior.me>
2021-09-29 11:49:41 +02:00
12b8b8be57
bump object-util
...
Signed-off-by: Avior <github@avior.me>
2021-09-29 10:23:01 +02:00
b7b604e11f
Add modules ( #41 )
...
* Added modules for object-utils
+ moved from parcel to esbuild
Signed-off-by: Avior <github@avior.me>
* Moved url-manager
Signed-off-by: Avior <github@avior.me>
* Fixed codacy error
Signed-off-by: Avior <github@avior.me>
2021-09-29 10:12:53 +02:00
dependabot[bot]
329f1ee06d
Bump ts-node from 9.1.1 to 10.2.1 ( #37 )
...
Bumps [ts-node](https://github.com/TypeStrong/ts-node ) from 9.1.1 to 10.2.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases )
- [Commits](https://github.com/TypeStrong/ts-node/compare/v9.1.1...v10.2.1 )
---
updated-dependencies:
- dependency-name: ts-node
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-28 17:40:52 +02:00
3d02a29bc5
Move to NPM ( #32 )
...
* Update workflow
Signed-off-by: Avior <github@avior.me>
* Fixed parcel version
Signed-off-by: Avior <github@avior.me>
* Some more fixes
Signed-off-by: Avior <github@avior.me>
* Removed console.memory
Signed-off-by: Avior <github@avior.me>
* Update
Signed-off-by: Avior <github@avior.me>
* fuck windows
Signed-off-by: Avior <github@avior.me>
* bump config for better node 12 support
Signed-off-by: Avior <github@avior.me>
2021-09-28 15:57:36 +02:00
49d5e98a43
bump 1.4.0
...
Signed-off-by: Avior <github@avior.me>
2021-09-28 11:48:01 +02:00
cb97ded195
Add objectOmit function
...
- also bump deps (not parcel because 2 is not the way I want to continue using it)
Signed-off-by: Avior <github@avior.me>
2021-09-28 11:47:33 +02:00
ffaf544d10
bump version
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-09-21 21:43:26 +02:00
4efb33c0cb
Added objectClean and isObject functions
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-09-21 21:39:16 +02:00
418c36efda
Updated CHANGELOG
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-21 16:34:08 +02:00
7f6d999ad6
v1.2.0
2021-05-21 16:22:16 +02:00
73ac335ea8
Moved deprecated tests to a new file
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-21 16:21:52 +02:00
332a821f2f
deprecated objectToArray
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-21 16:21:34 +02:00
1c87c5c207
Added index to objectMap
and objectLoop
functions
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-05-21 16:20:57 +02:00
0b084833a3
Added addional tests
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-11 01:37:35 +02:00
589738dcbc
Updated CHANGELOG
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-11 00:48:58 +02:00
f79a23c261
v1.1.1
2021-04-11 00:38:09 +02:00
acd5b781cf
Merge branch 'master' of github.com:dzeiocom/libs
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-11 00:37:50 +02:00
4b3a37eb35
v1.1.0
2021-04-11 00:35:12 +02:00
76e2263812
Updated objectSort to support an Array containing a specific order
...
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-11 00:34:14 +02:00
0948650263
Made next release have no .cache file
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-02-08 13:49:36 +01:00
799c0269c2
Publish
...
- @dzeio/dom-manager@1.2.4
- easy-sitemap@1.0.1
- @dzeio/listener@1.0.1
- @dzeio/logger@2.0.3
- @dzeio/object-util@1.0.5
- @dzeio/queue@1.1.3
- @dzeio/url-manager@1.0.5
2021-02-08 11:26:49 +01:00
980caaf3b3
Implement fix + tests ( #14 )
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2021-02-08 10:53:17 +01:00
679291d7a8
Updated description of objectMap
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 17:13:28 +01:00
e29eafd2d2
Moved from Webpack to Parcel
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 16:07:30 +01:00
c550c99f24
Moved every .gitignore to root folder
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 15:51:10 +01:00
a27d081425
Renamed Jest base config file
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 15:50:31 +01:00
6e4c2a6362
Simplified Jest Configuration
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 12:52:02 +01:00
fcc3163c7c
Updated Deps
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 12:51:48 +01:00
bfdb6d598d
Switch cloneObject to objectClone
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 11:54:18 +01:00
6056bde78a
Added Changelog for packages
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-12-08 11:53:44 +01:00
6f6ac3089a
Publish
...
- @dzeio/object-util@1.0.4
- @dzeio/url-manager@1.0.3
2020-11-23 02:33:43 +01:00
f87e3047fc
Fixed bug where null were considered as objects
...
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
2020-11-23 02:27:16 +01:00
4637abeaaf
Fixed comment on published code
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-10-21 10:40:10 +02:00
5c230d74e5
Added Tests and Documentation
...
Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
2020-10-20 15:11:30 +02:00
f5b54f1816
Publish
...
- @dzeio/dom-manager@1.2.2
- @dzeio/logger@2.0.2
- @dzeio/object-util@1.0.2
- @dzeio/queue@1.1.2
- @dzeio/url-manager@1.0.2
2020-10-20 13:47:57 +02:00