fakergem
Version: 
A javascript version of the Faker ruby gem
25 lines (21 loc) • 929 B
Markdown
# Faker.Compass
```js
// A random direction
Faker.Compass.direction()                 //=> "southeast"
Faker.Compass.cardinal()                  //=> "north"
Faker.Compass.ordinal()                   //=> "northwest"
Faker.Compass.halfWind()                 //=> "north-northwest"
Faker.Compass.quarterWind()              //=> "north by west"
// Random abbreviation
Faker.Compass.abbreviation()              //=> "NEbN"
Faker.Compass.cardinalAbbreviation()     //=>    "N"
Faker.Compass.ordinalAbbreviation()      //=>   "SW"
Faker.Compass.halfWindAbbreviation()    //=>  "NNE"
Faker.Compass.quarterWindAbbreviation() //=> "SWbS"
// Random azimuth
Faker.Compass.azimuth()                   //=> "168.75"
Faker.Compass.cardinalAzimuth()          //=>     "90"
Faker.Compass.ordinalAzimuth()           //=>    "135"
Faker.Compass.halfWindAzimuth()         //=>  "292.5"
Faker.Compass.quarterWindAzimuth()      //=>  "56.25"
```