approximate-now
approximate-now copied to clipboard
API access differs from that of Date
Is it intentional for the package's API access to differ from that of Date? I initially expected the package to work as a drop-in replacement of Date.now() by exporting a function by the name of now() rather than an object with a property by the name of now.
Is this something you'd allow a PR to change? I have a branch with performance increases adding up to a little over 100%. I'd like to create a PR for it but it's based on an API refactor that would close this issue.
Yes, it is intentional to avoid an unnecessary function call.
Could you elaborate on what you mean by unnecessary? Accessing approximateTime.now right now calls the function bound to its get attribute. There's already a function call.
You are not wrong... Yeah, I would accept a PR.