Socket
Socket
Sign inDemoInstall

@travi/any

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travi/any - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

72

dist/any.js
'use strict';
var Chance = require('chance');
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var Chance = _interopDefault(require('chance'));
var chance = new Chance();
var DEFAULT_SIZE_RANGE = {
max: 20,
min: 1
};
function integer(options) {
var DEFAULT_SIZE_RANGE = { max: 20, min: 1 };
var integer = function integer(options) {
return chance.natural(options);
}
function string(options) {
};
var string = function string(options) {
return chance.string(options);
}
function word() {
};
var word = function word() {
return chance.word();
}
function url(options) {
};
var url = function url(options) {
return chance.url(options);
}
function boolean() {
};
var boolean = function boolean() {
return chance.bool();
}
function email() {
};
var email = function email() {
return chance.email();
}
function date() {
};
var date = function date() {
return chance.date({ string: true });
}
};

@@ -49,5 +44,6 @@ function simpleObject() {

function listOf(constructor, options) {
var options = options || {},
list = [],
function listOf(constructor) {
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
var list = [],
listSize = options.size || integer(Object.assign({}, DEFAULT_SIZE_RANGE, options));

@@ -62,12 +58,10 @@

module.exports = {
string: string,
word: word,
integer: integer,
boolean: boolean,
url: url,
email: email,
date: date,
simpleObject: simpleObject,
listOf: listOf
};
exports.string = string;
exports.word = word;
exports.integer = integer;
exports.boolean = boolean;
exports.url = url;
exports.email = email;
exports.date = date;
exports.simpleObject = simpleObject;
exports.listOf = listOf;
{
"name": "@travi/any",
"version": "0.2.0",
"version": "0.3.0",
"description": "random data generator for when test data is insignificant",

@@ -45,3 +45,3 @@ "main": "dist/any.js",

"grunt-rollup": "0.7.1",
"istanbul": "0.4.3",
"istanbul": "1.0.0-alpha.2",
"load-grunt-config": "0.19.2",

@@ -48,0 +48,0 @@ "mocha": "2.5.3",

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