{"id":17641652,"url":"https://github.com/rogeriopvl/windrose","last_synced_at":"2025-05-06T22:08:16.961Z","repository":{"id":25720034,"uuid":"29156979","full_name":"rogeriopvl/windrose","owner":"rogeriopvl","description":"🌷 Convert compass degrees into points of the compass and vice versa","archived":false,"fork":false,"pushed_at":"2022-12-30T17:14:02.000Z","size":213,"stargazers_count":14,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T22:08:05.275Z","etag":null,"topics":["browser","compass","degrees","node","windrose"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rogeriopvl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-12T21:07:36.000Z","updated_at":"2024-11-19T12:57:10.000Z","dependencies_parsed_at":"2023-01-14T03:16:48.214Z","dependency_job_id":null,"html_url":"https://github.com/rogeriopvl/windrose","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fwindrose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fwindrose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fwindrose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogeriopvl%2Fwindrose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogeriopvl","download_url":"https://codeload.github.com/rogeriopvl/windrose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252776581,"owners_count":21802468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","compass","degrees","node","windrose"],"created_at":"2024-10-23T07:07:27.045Z","updated_at":"2025-05-06T22:08:16.938Z","avatar_url":"https://github.com/rogeriopvl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# windrose\n\n[![Build Status](https://secure.travis-ci.org/rogeriopvl/windrose.svg?branch=master)](http://travis-ci.org/rogeriopvl/windrose) [![Greenkeeper badge](https://badges.greenkeeper.io/rogeriopvl/windrose.svg)](https://greenkeeper.io/)\n\n## Info\n\nWindrose is a javascript browser/node module that converts compass degrees into compass points and vice versa.\n\n## Getting Started\n\n### NPM\n\n    npm install windrose --save\n\n### Bower\n\n    bower install windrose --save\n\n## Usage\n\n### Node\n\n```javascript\nvar Windrose = require('windrose');\n\nWindrose.getPoint(225);       /* returns { symbol: 'SW', name: 'South West', depth: 1 } */\nWindrose.getPoint(236.25);    /* returns { symbol: SWbW, name: 'South West by West', depth: 3 } */\n\nWindrose.getPoint(236.25, { depth: 0 });    /* returns { symbol: 'W', name: 'West', depth: 0 } */\n\nWindrose.getDegrees('S');     /* returns { min: 174.375, value: 180, max: 185.625 } */\nWindrose.getDegrees('South'); /* returns { min: 174.375, value: 180, max: 185.625 } */\n\nWindrose.getDegrees('S', { depth: 0 });     /* returns { min: 135, value: 180, max: 225 } */\n```\n\n### Browser\n\nJust include it in your html:\n\n    \u003cscript type=\"text/javascript\" src=\"windrose.js\"\u003e\n\nThe `Windrose` object will be available in your global scope.\n\nIt also supports AMD.\n\n## API\n\n### Windrose.getPoint(degrees, opts)\n\n* `degrees` (number) the degrees to convert to point (only valid if \u003e= 0 or \u003c= 360)\n* `opts` (object) options hash [optional]\n    * `depth` (integer) the depth of search it can be a value between 0 and 3.\n\n    With value `0`, it only returns the 4 main compass points (N, E, S, W).\n\n    With value `1` returns the main 8 compass points (N, NE, E, SE, S, SW, W, NW).\n\n    With value `2` returns the main 16 compass points (N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW).\n\n    With value `3` returns the 32 points of the compass.\n\n    With value `4` returns the 64 points of the compass.\n\n    With value `5` returns the 128 points of the compass.\n\n    Any other value will return `undefined`.\n\n### Windrose.getDegrees(name, opts)\n\n* `name` (string) the name or symbol of the compass point to convert to degrees\n* `opts` (object) options hash [optional]\n    * `depth` (integer) the depth of search it can be a value between 0 and 5.\n\n## License\nCopyright (c) 2015 Rogério Vicente. Licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fwindrose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogeriopvl%2Fwindrose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogeriopvl%2Fwindrose/lists"}