hypem-resolver
Package for Node to resolve a hypem song url to it's soundcloud/mp3 url.
Usage
Install via npm
npm install hypem-resolver
Require the package
var hypemResolver =
Convert the hypem id to the songs url
// song is hosted on soundcloud (http://hypem.com/track/2c87x)hypemResolver; // song is hosted as mp3 somewhere else (http://hypem.com/track/2c2k1)hypemResolver; // song is not hosted anywhere (http://hypem.com/track/2c96b)hypemResolver; // you can also use promises instead of callbackshypemResolver ;
There's also a little helper method to extract the hypem id from the song's url.
var hypemId = hypemResolver;console; // hypemId = 2c87x
Contribute
If you want to contribute make sure all tests pass and the test coverage is always over 90%.
There are 3 possible commands to run the tests. All will execute the same tests.
-
The basic command will run all tests and also generate a cover report (under '/coverage'):
npm test
-
To do the same as the basic command but on a windows machine use the following command:
npm run test-win
-
You can also run the test with a watcher. This works on all platforms and does not generate a cover report:
npm run test-watch