Socket
Socket
Sign inDemoInstall

mockdata

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

13

example/example.js

@@ -9,5 +9,8 @@ var mock = require('../');

//number (length)
console.log(mock.number(10));
//number (max)
console.log(mock.n(10));
//bignumber (length)
console.log(mock.bignumber(10));
//site

@@ -40,1 +43,7 @@ console.log(mock.url());

console.log(mock.word());
//range
console.log(mock.range(0, 10));
//image
console.log(mock.image(100, 800, 100, 800));

@@ -79,3 +79,3 @@ var data = require('./data');

number: function(len){
bignumber: function(len){
var t="";

@@ -165,2 +165,8 @@ while(len--){

return a.join(" ");
},
image: function(minW, maxW, minH, maxH) {
var w = this.range(minW, maxW);
var h = this.range(minH, maxH);
return "http://dummyimage.com/"+w+"x"+h+"/000/fff";
}

@@ -167,0 +173,0 @@ };

2

package.json
{
"name": "mockdata",
"description": "a library to generate mock data",
"version": "0.0.1",
"version": "0.0.2",
"homepage": "https://github.com/jgallen23/mockdata",

@@ -6,0 +6,0 @@ "author": "Greg Allen <@jgaui> (http://jga.me)",

@@ -15,5 +15,8 @@ # Mock Data

//number (length)
console.log(mock.number(10));
//number (max)
console.log(mock.n(10));
//bignumber (length)
console.log(mock.bignumber(10));
//site

@@ -47,4 +50,10 @@ console.log(mock.url());

//range
console.log(mock.range(0, 10));
//image
console.log(mock.image(100, 800, 100, 800));
## Installation
npm install mockdata
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