Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

poly-js-utils

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

poly-js-utils - npm Package Compare versions

Comparing version 1.2.7 to 1.2.8

2

package.json
{
"name": "poly-js-utils",
"version": "1.2.7",
"version": "1.2.8",
"description": "Common client-side tools used in HSS Sites themes and locators.",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -477,2 +477,12 @@ # Poly JS Utils

#### loadGoogleMapsScript
Used to load Google Maps after the page has loaded. This takes a callback parameter that can be used if you need a callback once Google Maps is loaded. This function should go inside something like `$(document).ready()`.
*Params:*
* `key` (string, optional): The Google Maps API key
* `callback` (string, optional): The function name of your callback
*Return Type:* `None`
## Contributing

@@ -479,0 +489,0 @@

@@ -109,2 +109,19 @@ var _ = require('underscore');

var loadGoogleMapsScript = function(key, callback) {
var script = document.createElement("script");
script.type = "text/javascript";
var keyString = key ? "key=" + key : "";
var callbackString = callback ? "callback=" + callback : "";
if(keyString && callbackString) {
script.src = "https://maps.googleapis.com/maps/api/js?" + keyString + "&" + callbackString;
} else if (keyString && !callbackString) {
script.src = "https://maps.googleapis.com/maps/api/js?" + keyString;
} else if (!keyString && callbackString) {
script.src = "https://maps.googleapis.com/maps/api/js?" + callbackString;
} else {
script.src = "https://maps.googleapis.com/maps/api/js";
}
document.body.appendChild(script);
};
exports.stripNonDigits = stripNonDigits;

@@ -121,1 +138,2 @@ exports.makeAbsolute = makeAbsolute;

exports.selectBoxIsTrue = selectBoxIsTrue;
exports.loadGoogleMapsScript = loadGoogleMapsScript;
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