Socket
Socket
Sign inDemoInstall

randexp

Package Overview
Dependencies
2
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.2 to 0.5.3

types/index.d.ts

2

lib/randexp.js

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

'use strict';
const ret = require('ret');

@@ -4,0 +2,0 @@ const DRange = require('drange');

@@ -11,3 +11,3 @@ {

],
"version": "0.5.2",
"version": "0.5.3",
"homepage": "http://fent.github.io/randexp.js/",

@@ -21,7 +21,9 @@ "repository": {

"files": [
"lib"
"lib",
"types/index.d.ts"
],
"scripts": {
"version": "gulp build && git add build",
"test": "istanbul cover node_modules/.bin/_mocha -- test/*-test.js"
"test": "istanbul cover node_modules/.bin/_mocha -- test/*-test.js",
"dtslint": "dtslint types --onlyTestTsNext"
},

@@ -32,3 +34,3 @@ "directories": {

"dependencies": {
"drange": "^1.0.0",
"drange": "^1.0.2",
"ret": "^0.2.0"

@@ -50,3 +52,4 @@ },

},
"license": "MIT"
"license": "MIT",
"types": "./types"
}

@@ -76,3 +76,3 @@ # randexp.js

The default randomness is provided by `Math.random()`. If you need to use a seedable or cryptographic PRNG, you
can override `RandExp.prottoype.randInt` or `randexp.randInt` (where `randexp` is an instance of `RandExp`). `randInt(from, to)` accepts an inclusive range and returns a randomly selected number within that range.
can override `RandExp.prototype.randInt` or `randexp.randInt` (where `randexp` is an instance of `RandExp`). `randInt(from, to)` accepts an inclusive range and returns a randomly selected number within that range.

@@ -132,1 +132,16 @@ # Infinite Repetitionals

```
# Integration with TypeScript
RandExp includes TypeScript definitions.
```typescript
import * as RandExp from "randexp";
const randexp = new RandExp(/[a-z]{6}/);
randexp.gen();
```
Use dtslint to check the definition file.
npm install -g dtslint
npm run dtslint
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc