This code is not obviously malicious (no obfuscated payloads, no eval, no reverse shells), but it contains serious security/privacy issues: hard-coded Cosmos DB primary key and a public API key are embedded in source; a client-side fetch sends user IP/location to an external service and that data (and other user/environment info) is written to Cosmos DB. If this runs in browser context, DB credentials will be exposed and can be abused. Recommend removing credentials from client-side code, moving DB writes to a trusted server-side component, rotating exposed keys, and tightening data handling and validation.
Live on npm for 9 hours and 30 minutes before removal. Socket users were protected even while the package was live.