make_fakes v1.2.9
make_fakes
Instructions:
npm install make_fakes
const make_fakes = require('make_fakes')
If utilizing in html...:
<script src="./node_modules/make_fakes/index.js"></script>
<script>
$(()=> {
const output = make_fakes.method(parameter)
})
</script>
Functions
createOne(object, object) ⇒ object
make_fakes.createOne(object)
Kind: global function
Date: 2022-03-02
Param | Type |
---|---|
object | object |
object | object |
Example
const make_fakes = require("make_fakes")
let hourglass = {
public: "boolean",
seconds: "number",
start: "past_date",
description: "paragraph",
edit: "date",
end: "future_date",
status: ["to do", "doing", "done"],
title: "string",
email: "email",
created: "date"
}
let getOne = make_fakes.createOne(hourglass, { title: "hello" })
console.log("🚀 ~ file: index.js ~ line 17 ~ getOne", getOne)
createOneDirty(object, object) ⇒ object
Returns realistic fake dirty data boolean -> boolean to string or undefined number -> stringed number, float, undefined email -> string, number, undefined password -> " ", undefined, paragraph, past_date -> dateInput format, LL format, undefined future_date -> L format, l format, undefined date -> dateInput format, ll format phone -> future_date, boolean, undefined image -> string, " ", undefined
Kind: global function
Date: 2022-03-02
Param | Type |
---|---|
object | object |
object | object |
Example
const make_fakes = require("make_fakes")
let hourglass = {
public: "boolean",
seconds: "number",
start: "past_date",
description: "paragraph",
edit: "date",
end: "future_date",
status: ["to do", "doing", "done"],
title: "string",
email: "email",
created: "date"
}
let getOneDirty = make_fakes.createOneDirty(hourglass, { title: "hello" })
console.log("🚀 ~ file: index.js ~ line 23 ~ getOneDirty", getOneDirty)
createMany(object, length, addId, things) ⇒ array
Kind: global function
Date: 2022-03-08
Author: zen-out
Param | Type | Default | Description |
---|---|---|---|
object | object | ||
length | number | 1 | |
addId | boolean | false | |
things | object | to add |
Example
const make_fakes = require("make_fakes")
let hourglass = {
public: "boolean",
seconds: "number",
start: "past_date",
description: "paragraph",
edit: "date",
end: "future_date",
status: ["to do", "doing", "done"],
title: "string",
email: "email",
created: "date"
}
let getMany = make_fakes.createMany(hourglass, 2, true, { title: "hello" })
console.log("🚀 ~ file: index.js ~ line 17 ~ getOne", getMany)
createManyDirty(object, length, addId, things) ⇒ array
Kind: global function
Date: 2022-03-02
Param | Type | Default | Description |
---|---|---|---|
object | object | ||
length | number | 1 | |
addId | boolean | false | |
things | object | to add |
Example
const make_fakes = require("make_fakes")
let hourglass = {
public: "boolean",
seconds: "number",
start: "past_date",
description: "paragraph",
edit: "date",
end: "future_date",
status: ["to do", "doing", "done"],
title: "string",
email: "email",
created: "date"
}
let getManyDirty = make_fakes.createManyDirty(hourglass, 2, true, { title: "hello" })
console.log("🚀 ~ file: index.js ~ line 23 ~ getOneDirty", getManyDirty)
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago