agenda / human-interval

Human readable time distances for javascript
Other
461 stars 14 forks source link

Cleanup syntax #12

Closed simison closed 7 years ago

simison commented 7 years ago

Requires https://github.com/rschmukler/human-interval/pull/11 to go in first as this PR requires newer Expect.js than master branch currently has.

simison commented 7 years ago

Actually seems like earlier PR by @TheAbstractDev https://github.com/rschmukler/human-interval/pull/7 helps to return NaN on unrecognised type units. This PR changes that to throw an error.

Not sure which is better. This would be breaking change anyway so would require v1.0.0 semver on NPM.

I can also change back to NaN and just add missing test for it.

OmgImAlexis commented 7 years ago

@simison shall we switch to ava and xo here as well?

simison commented 7 years ago

@OmgImAlexis totally +1 for xo