Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): add createCalculator #696

Closed

Conversation

johnhooks
Copy link
Contributor

@johnhooks johnhooks commented Dec 11, 2022

By creating a more complicated calculator object in createDinero, core functions could be optimized by not recreating constants in closures on every function call in the dinero.js api. It's based off some observations in #694.

@sarahdayan this is just an idea with some sudo code that isn't complete. Let me know what you think.

@vercel
Copy link

vercel bot commented Dec 11, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
dinerojs ✅ Ready (Inspect) Visit Preview Dec 11, 2022 at 6:24PM (UTC)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7933bb4:

Sandbox Source
@dinero.js/example-cart-react Configuration
@dinero.js/example-cart-vue Configuration
@dinero.js/example-pricing-react Configuration
@dinero.js/example-starter Configuration

@johnhooks
Copy link
Contributor Author

Scratch that idea, I just realized that ruins the tree shaking. I'll keep thinking on it, there should be a way to simplify it.

@johnhooks johnhooks closed this Dec 12, 2022
@johnhooks johnhooks deleted the refactor/create-calculator branch February 19, 2023 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant