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

google-maps-js-api-loader

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-maps-js-api-loader - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

6

index.d.ts

@@ -107,5 +107,9 @@ /// <reference types="google.maps" />

/**
* @returns error for {@link google.maps} script or `undefined`
*/
static getError(): Error | undefined;
/**
* @returns error for the provided {@link library} or `undefined`
*/
static getError(library: GoogleMapsLibrary): google.maps.MapsServerError | google.maps.MapsNetworkError | google.maps.MapsRequestError | undefined;
static getError(library: GoogleMapsLibrary): Error | google.maps.MapsServerError | google.maps.MapsNetworkError | google.maps.MapsRequestError | undefined;
}

@@ -112,0 +116,0 @@ interface GoogleMapsLoader extends Identity<typeof GoogleMapsLoader> {

7

index.js

@@ -14,2 +14,3 @@ // src/index.ts

let status = 0 /* NONE */;
let error;
const statuses = ["none", "loading", "loaded", "error"];

@@ -61,3 +62,3 @@ const store = /* @__PURE__ */ new Map();

GoogleMapsLoader.get = (key) => store.has(key) ? store.get(key)[2] : void 0;
GoogleMapsLoader.getError = (key) => store.has(key) ? store.get(key)[3] : void 0;
GoogleMapsLoader.getError = (key) => key ? store.has(key) ? store.get(key)[3] : void 0 : error;
GoogleMapsLoader.getStatus = (key) => statuses[key ? store.has(key) ? store.get(key)[0] : 0 /* NONE */ : status];

@@ -83,3 +84,3 @@ GoogleMapsLoader.getCompletion = createCompletionGetter((key) => (store.get(key) || initData(key))[1]);

status = 3 /* ERROR */;
reject(new Error(errorMessage));
reject(error = new Error(errorMessage));
} else {

@@ -98,3 +99,3 @@ status = 1 /* LOADING */;

status = 3 /* ERROR */;
reject(new Error("google.maps could not load"));
reject(error = new Error("google.maps could not load"));
});

@@ -101,0 +102,0 @@ };

{
"name": "google-maps-js-api-loader",
"version": "4.0.1",
"author": "Krombik",
"version": "4.0.2",
"author": "Andrii Dubetskyi",
"description": "A lightweight JavaScript library for loading the Google Maps JavaScript API",

@@ -6,0 +6,0 @@ "keywords": [

@@ -155,2 +155,4 @@ # google-maps-js-api-loader

```ts
static getError(): Error | undefined;
static getError(

@@ -171,2 +173,2 @@ library: GoogleMapsLibrary

MIT © [Krombik](https://github.com/Krombik)
MIT © [Andrii Dubetskyi](https://github.com/Krombik)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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