Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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 1.7.0 to 1.7.1

lib/any.cjs.js.map

16

docs/API.md
# API Reference
* [`simpleObject`](#simpleobject)
* [`objectWithKeys`](#objectwithkeys)
* [`fromList`](#fromlist)
* [`listOf`](#listof)
* [`string`](#string)
* [`word`](#word)
* [`sentence`](#sentence)
* [`paragraph`](#paragraph)
* [`integer`](#integer)
* [`float`](#float)
* [`boolean`](#boolean)
* [`url`](#url)
* [`email`](#email)
* [`date`](#date)
* [`subset`](#subset)
## `simpleObject`

@@ -4,0 +20,0 @@

25

lib/any.cjs.js

@@ -103,27 +103,31 @@ 'use strict';

function isPrimitive(value) {
return value !== Object(value);
}
var chance = new Chance(seed);
var integer = function integer(options) {
return chance.natural(options);
return chance.natural(!isPrimitive(options) ? options : undefined);
};
var float = function float(options) {
return chance.floating(options);
return chance.floating(!isPrimitive(options) ? options : undefined);
};
var string = function string(options) {
return chance.string(options);
return chance.string(!isPrimitive(options) ? options : undefined);
};
var sentence = function sentence(options) {
return chance.sentence(options);
return chance.sentence(!isPrimitive(options) ? options : undefined);
};
var paragraph = function paragraph(options) {
return chance.paragraph(options);
return chance.paragraph(!isPrimitive(options) ? options : undefined);
};
var url = function url(options) {
return chance.url(options);
return chance.url(!isPrimitive(options) ? options : undefined);
};
var boolean = function boolean(options) {
return chance.bool(options);
return chance.bool(!isPrimitive(options) ? options : undefined);
};
var email = function email(options) {
return chance.email(options);
return chance.email(!isPrimitive(options) ? options : undefined);
};

@@ -144,3 +148,5 @@ var date = function date() {

return options.length ? chance.word(options) : chance.word(_extends({ syllables: 3 }, options));
return options.length ? chance.word(options) : chance.word(_extends({
syllables: 3
}, !isPrimitive(options) ? options : undefined));
}

@@ -223,1 +229,2 @@

module.exports = index;
//# sourceMappingURL=any.cjs.js.map

@@ -99,27 +99,31 @@ import Chance from 'chance';

function isPrimitive(value) {
return value !== Object(value);
}
var chance = new Chance(seed);
var integer = function integer(options) {
return chance.natural(options);
return chance.natural(!isPrimitive(options) ? options : undefined);
};
var float = function float(options) {
return chance.floating(options);
return chance.floating(!isPrimitive(options) ? options : undefined);
};
var string = function string(options) {
return chance.string(options);
return chance.string(!isPrimitive(options) ? options : undefined);
};
var sentence = function sentence(options) {
return chance.sentence(options);
return chance.sentence(!isPrimitive(options) ? options : undefined);
};
var paragraph = function paragraph(options) {
return chance.paragraph(options);
return chance.paragraph(!isPrimitive(options) ? options : undefined);
};
var url = function url(options) {
return chance.url(options);
return chance.url(!isPrimitive(options) ? options : undefined);
};
var boolean = function boolean(options) {
return chance.bool(options);
return chance.bool(!isPrimitive(options) ? options : undefined);
};
var email = function email(options) {
return chance.email(options);
return chance.email(!isPrimitive(options) ? options : undefined);
};

@@ -140,3 +144,5 @@ var date = function date() {

return options.length ? chance.word(options) : chance.word(_extends({ syllables: 3 }, options));
return options.length ? chance.word(options) : chance.word(_extends({
syllables: 3
}, !isPrimitive(options) ? options : undefined));
}

@@ -219,1 +225,2 @@

export default index;
//# sourceMappingURL=any.es.js.map
{
"name": "@travi/any",
"version": "1.7.0",
"version": "1.7.1",
"description": "random data generator for when test data is insignificant",

@@ -10,2 +10,3 @@ "main": "lib/any.cjs.js",

"build": "rollup -c",
"docs:toc": "markdown-toc --no-firsth1 --maxdepth 1 --bullets \"*\" docs/API.md",
"lint:js": "eslint .",

@@ -70,2 +71,3 @@ "lint:md": "globstar --node -- markdownlint *.md '**/*.md'",

"husky": "0.15.0-rc.3",
"markdown-toc": "1.2.0",
"markdownlint-cli": "0.6.0",

@@ -72,0 +74,0 @@ "mocha": "5.0.0",

@@ -23,5 +23,5 @@ /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */

output: [
{file: 'lib/any.cjs.js', format: 'cjs'},
{file: 'lib/any.es.js', format: 'es'}
{file: 'lib/any.cjs.js', format: 'cjs', sourcemap: true},
{file: 'lib/any.es.js', format: 'es', sourcemap: true}
]
};
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