Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Apr 25, 2016
1 parent ddd334e commit 92264c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ $ npm install --save random-coordinates
var randomCoordinates = require('random-coordinates');

// API
// - randomCoordinates();
// - randomCoordinates(fixed);
// - randomCoordinates([options]);

// options
// - fixed

randomCoordinates();
// => "-29.52974, 24.52815"
Expand All @@ -31,7 +33,7 @@ randomCoordinates();
By default includes 5 fixed digits after decimal, can specify otherwise.

```js
randomCoordinates(2)
randomCoordinates({ fixed: 2 })
// => "-49.16, 68.81"
```

Expand Down
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
var randomLatitude = require('random-latitude');
var randomLongitude = require('random-longitude');

module.exports = function (fixed) {

var options = { fixed: fixed };

module.exports = function (options) {
return randomLatitude(options) + ', ' + randomLongitude(options);
};

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "random-coordinates",
"version": "1.0.0",
"version": "1.0.1",
"description": "Generate a random coordinates, which are latitude and longitude, comma separated.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"mocha": "^2.4.5"
},
"dependencies": {
"random-latitude": "^1.0.0",
"random-longitude": "^1.0.0"
"random-latitude": "^1.0.1",
"random-longitude": "^1.0.1"
}
}
2 changes: 1 addition & 1 deletion test/spec/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('random-coordinates: ', function () {

it('common', function () {

var ret = randomCoordinates(2);
var ret = randomCoordinates({ fixed: 2 });
var parts = ret.split(', ');

expect(parts[0])
Expand Down

0 comments on commit 92264c7

Please sign in to comment.