Skip to content

Instantly share code, notes, and snippets.

View danprowse's full-sized avatar

Daniel Prowse (He/Him) danprowse

View GitHub Profile
@varmais
varmais / thinced.js
Created October 1, 2015 19:43
Geolocation to Promise wrap example
var getPosition = function (options) {
return new Promise(function (resolve, reject) {
navigator.geolocation.getCurrentPosition(resolve, reject, options);
});
}
getPosition()
.then((position) => {
console.log(position);
})