add a package.json file, publish to npm

Maybe we can get this upstreamed so that I can avoid maintaining a fork. The package `discore-closest` is [already published to npm](https://www.npmjs.org/package/discore-closest).