@travi/any
Advanced tools
Comparing version 1.7.5 to 1.8.0
@@ -122,3 +122,3 @@ # API Reference | ||
Returns one item at random from the provided list. | ||
Direct usage of [`pickone()` from chance.js](http://chancejs.com/helpers/pickone.html). | ||
@@ -175,3 +175,3 @@ ### `fromList` parameters | ||
Direct usage of [`string()` from chance.js](http://chancejs.com/#string). | ||
Direct usage of [`string()` from chance.js](http://chancejs.com/basics/string.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -196,3 +196,3 @@ for what is available. | ||
Direct usage of [`word()` from chance.js](http://chancejs.com/#word). | ||
Direct usage of [`word()` from chance.js](http://chancejs.com/text/word.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -211,3 +211,3 @@ for what is available. | ||
Direct usage of [`sentence()` from chance.js](http://chancejs.com/#sentence). | ||
Direct usage of [`sentence()` from chance.js](http://chancejs.com/text/sentence.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -226,3 +226,3 @@ for what is available. | ||
Direct usage of [`paragraph()` from chance.js](http://chancejs.com/#paragraph). | ||
Direct usage of [`paragraph()` from chance.js](http://chancejs.com/text/paragraph.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -245,5 +245,5 @@ for what is available. | ||
Produces a random integer > 0. Direct usage of | ||
[`natural()` from chance.js](http://chancejs.com/#natural). Options are passed | ||
directly to the chance method so refer to its documentation for what is | ||
available. | ||
[`natural()` from chance.js](http://chancejs.com/basics/natural.html). | ||
Options are passed directly to the chance method so refer to its | ||
documentation for what is available. | ||
@@ -260,3 +260,3 @@ ### `integer` example | ||
Direct usage of [`floating()` from chance.js](http://chancejs.com/#floating). | ||
Direct usage of [`floating()` from chance.js](http://chancejs.com/basics/floating.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -289,5 +289,5 @@ for what is available. | ||
Direct usage of [`url()` from chance.js](http://chancejs.com/#url). Options are | ||
passed directly to the chance method so refer to its documentation for what is | ||
available. | ||
Direct usage of [`url()` from chance.js](http://chancejs.com/web/url.html). | ||
Options are passed directly to the chance method so refer to its | ||
documentation for what is available. | ||
@@ -304,3 +304,3 @@ ### `url` example | ||
Direct usage of [`email()` from chance.js](http://chancejs.com/#email). | ||
Direct usage of [`email()` from chance.js](http://chancejs.com/web/email.html). | ||
Options are passed directly to the chance method so refer to its documentation | ||
@@ -319,3 +319,3 @@ for what is available. | ||
An almost direct usage of [`date()` from chance.js](http://chancejs.com/#date). | ||
An almost direct usage of [`date()` from chance.js](http://chancejs.com/time/date.html). | ||
No options passed to the `any` method are passed to the `chance` method, but | ||
@@ -335,3 +335,3 @@ the `{string: true}` option is passed because I have only had a use for the | ||
An almost direct usage of [`pickset()` from chance.js](http://chancejs.com/#pickset). | ||
An almost direct usage of [`pickset()` from chance.js](http://chancejs.com/helpers/pickset.html). | ||
The `size` option is passed directly to the chance method's `quantity` argument so | ||
@@ -338,0 +338,0 @@ refer to its documentation for what is available. |
@@ -123,2 +123,5 @@ 'use strict'; | ||
}; | ||
var fromList = function fromList(list) { | ||
return chance.pickone(list); | ||
}; | ||
@@ -171,6 +174,2 @@ function word() { | ||
function fromList (list) { | ||
return list[integer({ min: 0, max: list.length - 1 })]; | ||
} | ||
function objectWithKeys (keys) { | ||
@@ -177,0 +176,0 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
@@ -119,2 +119,5 @@ import Chance from 'chance'; | ||
}; | ||
var fromList = function fromList(list) { | ||
return chance.pickone(list); | ||
}; | ||
@@ -167,6 +170,2 @@ function word() { | ||
function fromList (list) { | ||
return list[integer({ min: 0, max: list.length - 1 })]; | ||
} | ||
function objectWithKeys (keys) { | ||
@@ -173,0 +172,0 @@ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
{ | ||
"name": "@travi/any", | ||
"version": "1.7.5", | ||
"version": "1.8.0", | ||
"description": "random data generator for when test data is insignificant", | ||
@@ -41,2 +41,7 @@ "main": "lib/any.cjs.js", | ||
"url": "https://twitter.com/intelxdesign" | ||
}, | ||
{ | ||
"name": "Zach Toben", | ||
"email": "zach.toben@gmail.com", | ||
"url": "https://ztoben.com/" | ||
} | ||
@@ -50,9 +55,9 @@ ], | ||
"dependencies": { | ||
"chance": "1.0.15", | ||
"debug": "3.1.0", | ||
"lodash": "4.17.9", | ||
"chance": "1.0.16", | ||
"debug": "4.0.0", | ||
"lodash": "4.17.10", | ||
"mersenne-twister": "1.1.0" | ||
}, | ||
"devDependencies": { | ||
"@travi/eslint-config-travi": "1.6.13", | ||
"@travi/eslint-config-travi": "1.6.18", | ||
"babel-cli": "6.26.0", | ||
@@ -65,22 +70,22 @@ "babel-plugin-transform-exponentiation-operator": "6.24.1", | ||
"chai": "4.1.2", | ||
"commitlint-config-travi": "1.2.29", | ||
"coveralls": "3.0.0", | ||
"commitlint-config-travi": "1.2.30", | ||
"coveralls": "3.0.2", | ||
"cz-conventional-changelog": "2.1.0", | ||
"formatio": "1.2.0", | ||
"globstar": "1.0.0", | ||
"greenkeeper-lockfile": "1.14.0", | ||
"husky": "1.0.0-rc.1", | ||
"greenkeeper-lockfile": "2.7.0", | ||
"husky": "1.0.0-rc.14", | ||
"markdown-toc": "1.2.0", | ||
"markdownlint-cli": "0.8.1", | ||
"mocha": "5.1.1", | ||
"npm-run-all": "4.1.2", | ||
"nyc": "11.7.1", | ||
"proxyquire": "2.0.1", | ||
"markdownlint-cli": "0.13.0", | ||
"mocha": "5.2.0", | ||
"npm-run-all": "4.1.3", | ||
"nyc": "13.0.1", | ||
"proxyquire": "2.1.0", | ||
"referee": "1.2.0", | ||
"referee-sinon": "1.0.3", | ||
"rimraf": "2.6.2", | ||
"rollup": "0.58.2", | ||
"rollup-plugin-babel": "3.0.4", | ||
"semantic-release": "15.1.7", | ||
"sinon": "4.5.0" | ||
"rollup": "0.65.2", | ||
"rollup-plugin-babel": "3.0.7", | ||
"semantic-release": "15.9.15", | ||
"sinon": "6.2.0" | ||
}, | ||
@@ -87,0 +92,0 @@ "config": { |
# Random data generator | ||
<!-- consumer badges --> | ||
[![npm](https://img.shields.io/npm/v/@travi/any.svg?style=flat)](https://www.npmjs.com/package/@travi/any) | ||
[![monthly downloads](https://img.shields.io/npm/dm/@travi/any.svg?style=flat)](https://www.npmjs.com/package/@travi/any) | ||
[![license](https://img.shields.io/github/license/travi/any.svg?style=flat)](LICENSE) | ||
<!-- status badges --> | ||
[![Build Status](https://img.shields.io/travis/travi/any.svg?style=flat)](https://travis-ci.org/travi/any) | ||
[![Coverage Status](http://img.shields.io/coveralls/travi/any.svg?style=flat)](https://coveralls.io/r/travi/any?branch=master) | ||
[![Build Status](https://img.shields.io/travis/travi/any.svg)](https://travis-ci.org/travi/any) | ||
[![Coverage Status](http://img.shields.io/coveralls/travi/any.svg)](https://coveralls.io/r/travi/any?branch=master) | ||
<!-- contribution badges --> | ||
[![PRs Welcome][prs-badge]][prs] | ||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat)](https://conventionalcommits.org) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat)](http://commitizen.github.io/cz-cli/) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat)](https://github.com/semantic-release/semantic-release) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/travi/any.svg)](https://greenkeeper.io/) | ||
Random data generator for when test data is insignificant. Tailoring data too | ||
@@ -43,9 +31,17 @@ closely for the domain can end up being confusing in tests because it distracts | ||
## Install | ||
## Usage | ||
```bash | ||
<!-- consumer badges --> | ||
[![npm](https://img.shields.io/npm/v/@travi/any.svg?style=flat)](https://www.npmjs.com/package/@travi/any) | ||
[![monthly downloads](https://img.shields.io/npm/dm/@travi/any.svg?style=flat)](https://www.npmjs.com/package/@travi/any) | ||
[![license](https://img.shields.io/github/license/travi/any.svg?style=flat)](LICENSE) | ||
[![Try @travi/any on RunKit](https://badge.runkitcdn.com/@travi/any.svg)](https://npm.runkit.com/@travi/any) | ||
### Install | ||
```sh | ||
$ npm install @travi/any --save-dev | ||
``` | ||
## Documentation | ||
### Documentation | ||
@@ -55,3 +51,25 @@ * [API](docs/API.md) | ||
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square | ||
## Contributing | ||
<!-- contribution badges --> | ||
[![PRs Welcome][prs-badge]][prs] | ||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/travi/any.svg)](https://greenkeeper.io/) | ||
### Dependencies | ||
```sh | ||
$ nvm install | ||
$ npm install | ||
``` | ||
### Verification | ||
```sh | ||
$ npm test | ||
``` | ||
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg | ||
[prs]: http://makeapullrequest.com |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40791
74
+ Addedchance@1.0.16(transitive)
+ Addeddebug@4.0.0(transitive)
+ Addedlodash@4.17.10(transitive)
+ Addedms@2.1.3(transitive)
- Removedchance@1.0.15(transitive)
- Removeddebug@3.1.0(transitive)
- Removedlodash@4.17.9(transitive)
- Removedms@2.0.0(transitive)
Updatedchance@1.0.16
Updateddebug@4.0.0
Updatedlodash@4.17.10