Skip to content

Instantly share code, notes, and snippets.

Sergey Khval SergeyKhval

Block or report user

Report or block SergeyKhval

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SergeyKhval
SergeyKhval / geolocation.js
Last active May 23, 2018
Promised version of getting user's geolocation
View geolocation.js
function getPositionPromised() {
function successCb(resolve) {
return position => resolve(position);
}
function errorCb(reject) {
return () => reject('Could not retrieve geolocation');
}
return new Promise((resolve, reject) => {
You can’t perform that action at this time.