
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
@compactjs/random
Advanced tools
Simple module to generate random values from a given range or array
· Homepage · Report Bug / Request Feature ·
npm install @compactjs/random
/**
* Returns a pseudo random number between min and max.
* (min inclusive, max exclusive)
* Max can be smaller than min.
* If max is not omitted, between 0 and min.
* If min is not omitted, between 0 and 1.
*/
function random(min?: number, max?: number): number;
/**
* Returns a random item from a given array
* @param choices to select from
*/
function pick(choices: any[]): any;
import { random, pick } from '@compactjs/random';
random(10, 100); // => random value between (including) 10 and 100
random(10); // => random value between 0 and 10
random(); // => random value between 0 and 1
pick([0, 1, 2, 3]); // => picks random value from 0,1,2,3
npm run test
👤 Timo Bechtel
Contributions, issues and feature requests are welcome!
git checkout -b feat/AmazingFeature
)npm run test
git commit -m 'feat: add amazingFeature'
)git push origin feat/AmazingFeature
)This project uses semantic-release for automated release versions. So commits in this project follow the Conventional Commits guidelines. I recommend using commitizen for automated commit messages.
Give a ⭐️ if this project helped you!
Distributed under the MIT License.
This README was generated with ❤️ by readme-md-generator
FAQs
Simple module to generate random values from a given range or array
The npm package @compactjs/random receives a total of 23 weekly downloads. As such, @compactjs/random popularity was classified as not popular.
We found that @compactjs/random demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.