karpathy/svmjs — pull request #2 by harthur (2012-11-14 06:59:20+00:00)
Title: Turn svmjs into an npm package

It would be awesome if people could consume this library from [node.js](http://nodejs.org). I'm sure a lot of node developers would love to play around with SVMs.

This PR does the necessary things to turn `svmjs` into a package that can be installed via [npm](https://npmjs.org/), node's package manager, which is bundled with node.

I changed the `svm.js` file so that it works both standalone in the browser, and if you imported it using `require('./svm')` from a file in the same directory, running in node.

I also added a `package.json` that will allow you to install svmjs as an npm package.

To get node.js people access to this, you'll need to publish the package to the npm registry. [Instructions on that are here](https://npmjs.org/doc/developers.html). Basically you'll need to create an npm account with `npm adduser`, then `npm publish` from the directory containing the `package.json` file.