
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Random integer, Random array element, Random string, Random boolean with given probability, Random offset of numerical
Generate random values of different types with clear syntax with 1K lib.
Random integer, random array element, random string, random boolean with given probability, random offset of numerical.
Type declaration added for Typescript.
npm install --save mk-randoms
Node js:
var random = require('mk-randoms')
ES6:
import random from 'mk-randoms/dist/random.es6'
import random from 'mk-randoms' // this will work as well
Browser:
<script src="node_modules/mk-randoms/dist/random.min.js"></script>
Random numerical value between min and max values.
Random integer between min and max values.
Random boolean. okProbability - is an optional probability of "TRUE" value percentage, dafault is 50.
Random string. length: is a length of string, dafault is 1. sourceStr: is a set of acceptable characters, default is "abcdefghijklmnopqrstuvwxyz"
Random element of array, or array - random subset of sourse array, where every source element can be copied no more then one time. arr: source array. quantity: default is 1, if 1 returns random array element, otherwise it is a length of resulting array, if quantity is larger then source array length, then returns source array.
Random shift of numerical value. val: original number. percentage: amplitude of discrepancy, default is 10.
Random integer shift of integer value. val: original number. percentage: amplitude of discrepancy, default is 10.
FAQs
Random integer, Random array element, Random string, Random boolean with given probability, Random offset of numerical
We found that mk-randoms 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.