prjctimg / huetiful

JavaScript utility library for simple 🧮, fast ⏱️ and accessible ♿ color manipulation.
http://huetiful-js.com/
Apache License 2.0
34 stars 6 forks source link

Remove dependency on lodash to reduce code bloat. #68

Closed prjctimg closed 1 year ago

prjctimg commented 1 year ago

For the sake of rapid prototyping, I had relied on the lodash library to provide utilities I needed to get the job done. However, as of v1.7, effort is being made to use vanilla JS for all utilities and implement the special ones myself.

So in version 1.8, I'm including a new directory fp/ that will contain all these utilities. The funcs inside will be categorised by the data types they work on. This will, also find the helpers.ts module being refactored and broken down into smaller modules for better readability

prjctimg commented 1 year ago

Since I'm trying to keep dot notation out of my code, I'll have to use object destructuring to expose the methods I'll need for that function. Functions must now enclose all the variables they rely on.

Each type will have a [type].ts file and all funcs that work on those structures will be kept in there.

prjctimg commented 1 year ago

Turns out object destructuring is limited on some types.

Managed to use native JS for most operations I used lodash for. And for the special case utilities, I added my own implementations without breaking the existing code.

Opening pull request soon...

prjctimg commented 1 year ago

Done!

@takanome-dev

This issue has been fixed in this commit

Awaiting tests to pass.