mdzhang / us-state-codes

A library to help you search, validate, and convert between US state names and postal codes.
MIT License
15 stars 9 forks source link

Added .json extension to require statement in index. #3

Closed Jtosbornex closed 6 years ago

Jtosbornex commented 6 years ago

First off, awesome module. I was able to use this quite seamlessly in a project for work.

In order for node to correctly parse the json file the extension is required. This was causing a build failure with the message that ./states could not be found

This may have worked for previous versions of node. It doesn't for v10.4.1

./states.json in the require statement is the fix implemented.

mdzhang commented 6 years ago

Hmm, I wasn't able to repro the issue on 10.4.1, but nor does adding the prefix break anything, so this seems :ok_hand: to me