New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@burdapraha/frontend

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@burdapraha/frontend - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

69

assets/javascripts/main.js

@@ -1,34 +0,41 @@

/**
* Cookie time format
* @param exp_days
* @returns {string}
*/
function cookieTimeInDays(exp_days)
{
var dt = new Date();
dt.setTime(dt.getTime() + (exp_days * 86400000)); // Convert days to ms
return dt.toUTCString();
}
(function ( $ ) {
window.BP_Frontend = function() {};
window.BP_Frontend.prototype = {
/**
* Credit: https://stackoverflow.com/a/25971410
* @type {{getLocation: Function}}
*/
var geoLocation = {
getLocation: function() {
var deferred = $.Deferred();
if(navigator.geolocation) {
// geo location is supported. Call navigator.geolocation.getCurrentPosition and :
// - resolve the promise with the returned Position object, or
// - reject the promise with the returned PositionError object, or
// - time out after 5 seconds
navigator.geolocation.getCurrentPosition(deferred.resolve, deferred.reject, { timeout: 5000 });
} else {
//geo location isn't supported
//Reject the promise with a suitable error message
deferred.reject(new Error('Your browser does not support Geo Location.'));
/**
* Cookie time format
* @param exp_days
* @returns {string}
*/
cookieTimeInDays: function(exp_days)
{
var dt = new Date();
dt.setTime(dt.getTime() + (exp_days * 86400000)); // Convert days to ms
return dt.toUTCString();
},
/**
* Credit: https://stackoverflow.com/a/25971410
* @returns {*}
*/
getLocation: function()
{
var deferred = $.Deferred();
if(navigator.geolocation) {
// geo location is supported. Call navigator.geolocation.getCurrentPosition and :
// - resolve the promise with the returned Position object, or
// - reject the promise with the returned PositionError object, or
// - time out after 5 seconds
navigator.geolocation.getCurrentPosition(deferred.resolve, deferred.reject, { timeout: 5000 });
} else {
//geo location isn't supported
//Reject the promise with a suitable error message
deferred.reject(new Error('Your browser does not support Geo Location.'));
}
return deferred.promise();
}
return deferred.promise();
}
};
};
}( jQuery ));
{
"name": "@burdapraha/frontend",
"version": "1.0.6",
"version": "1.0.7",
"description": "BurdaPraha UI kit",

@@ -29,3 +29,6 @@ "main": "assets/javascripts/main.js",

"run-sequence": "^1.2.2"
},
"dependencies": {
"jquery": "^3.2.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc