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

@scaleway/random-name

Package Overview
Dependencies
Maintainers
8
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scaleway/random-name - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

6

CHANGELOG.md
# Change Log
## 5.0.2
### Patch Changes
- [#1953](https://github.com/scaleway/scaleway-lib/pull/1953) [`1fddf05`](https://github.com/scaleway/scaleway-lib/commit/1fddf0515851908b094f983b05b3d87af8eef433) Thanks [@philibea](https://github.com/philibea)! - add cjs build
## 5.0.1

@@ -4,0 +10,0 @@

17

dist/index.js

@@ -1,2 +0,2 @@

const i = [
const ADJECTIVES = [
"admiring",

@@ -110,3 +110,4 @@ "adoring",

"zen"
], r = [
];
const NAMES = [
// Muhammad ibn Jābir al-Ḥarrānī al-Battānī was a founding father of astronomy. https://en.wikipedia.org/wiki/Mu%E1%B8%A5ammad_ibn_J%C4%81bir_al-%E1%B8%A4arr%C4%81n%C4%AB_al-Batt%C4%81n%C4%AB

@@ -590,8 +591,12 @@ "albattani",

"zhukovsky"
], l = (a = "", e = "-") => {
const n = `${i[Math.floor(Math.random() * i.length)] ?? ""}${e}${r[Math.floor(Math.random() * r.length)] ?? ""}`;
return n === `boring${e}wozniak` ? l(a, e) : a.length > 0 ? `${a}${e}${n}` : n;
];
const randomName = (prefix = "", separator = "-") => {
const name = `${ADJECTIVES[Math.floor(Math.random() * ADJECTIVES.length)] ?? ""}${separator}${NAMES[Math.floor(Math.random() * NAMES.length)] ?? ""}`;
if (name === `boring${separator}wozniak`) {
return randomName(prefix, separator);
}
return prefix.length > 0 ? `${prefix}${separator}${name}` : name;
};
export {
l as default
randomName as default
};
{
"name": "@scaleway/random-name",
"version": "5.0.1",
"version": "5.0.2",
"description": "A small utility to generate a random name",

@@ -33,4 +33,6 @@ "engines": {

"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx ."
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx .",
"test:unit": "vitest --run --config vite.config.ts",
"test:unit:coverage": "pnpm test:unit --coverage"
}
}

@@ -1,3 +0,1 @@

/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable import/no-relative-packages */
import { defineConfig, mergeConfig } from 'vite'

@@ -4,0 +2,0 @@ import { defaultConfig } from '../../vite.config'

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