HNHacker News
TopNewBestAskShowJobs

sarahdayan

47 karma · joined February 3, 2018

I'm a front-end developer with a taste for design and typography. I like to share what I know on HTML, CSS and JavaScript.
submissionscomments
sarahdayan··on How to sell to 20M software devs with amazing onboarding
Hi there! I work at Algolia and I may have a solution for you: you can filter on ranges to offer that kind of experience.

For instance, if you decide to accept a +/- $20 margin, instead of filtering on exact price, you'd create a filter like `price < 180 AND price > 220` (replacing the numbers with your formula to calculate the range).

This gives you full power on what is the "error margin" you accept. Hope this helps!

sarahdayan··on Dinero.js – JavaScript library for working with monetary values
Simple typo, fixed :)
sarahdayan··on Dinero.js – JavaScript library for working with monetary values
Good call, will fix.
sarahdayan··on Dinero.js – JavaScript library for working with monetary values
The amounts must be specified in cents, as floats can’t be relied upon to perform calculations. That was my #1 reason to design the library using solely integers. I wrote all about it here: https://frontstuff.io/how-to-handle-monetary-values-in-javas...
sarahdayan··on Dinero.js – JavaScript library for working with monetary values
Good call, I’ll fix that
sarahdayan··on Dinero.js – JavaScript library for working with monetary values
Hey! You need to use the allocate method for this. It will redistribute fractional cents and return an array of Dinero objects.