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

@augment-vir/browser

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/browser - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

6

dist/augments/string.js
export function randomString(inputLength = 16) {
const arrayLength = Math.ceil(inputLength / 2);
// server side
if (typeof window === 'undefined' || !window.crypto) {
throw new Error(`window/window.crypto is not defined for the "${randomString.name}" function. If using this in a Node.js context, import ${randomString.name} from 'augment-vir/node-js' instead`);
if (typeof self === 'undefined' || !self.crypto) {
throw new Error(`self/self.crypto is not defined for the "${randomString.name}" function. If using this in a Node.js context, import ${randomString.name} from 'augment-vir/node-js' instead`);
}
const uintArray = new Uint8Array(arrayLength);
window.crypto.getRandomValues(uintArray);
self.crypto.getRandomValues(uintArray);
return (Array.from(uintArray)

@@ -10,0 +10,0 @@ .map((value) => value.toString(16).padStart(2, '0'))

{
"name": "@augment-vir/browser",
"version": "6.1.0",
"version": "6.1.1",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/browser",

@@ -5,0 +5,0 @@ "bugs": {

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