Benthos
* Generates massive sample data in seconds
* Works both on Browser and Node environment
* Supports Generating data from template or schema
$3
``
bash
npm install benthos
`
$3
In Browser
`
html
`
In CommonJS
`
javascript
const benthos = require('benthos');
const email = benthos.email();
`
In ES2015 Modules
`
javascript
import { email } from 'benthos'
const email = email();
`
$3
`
javascript
import { name, email, url } from 'benthos';
let name = name(); // Harry Potter
let email = email('google.com'); // djeifl@google.com
let url = url({ host: 'markocen.com', path: 'blog' }) // http://markocen.com/blog
`
$3
`
javascript
import { compile } from 'benthos';
// bio = 'Hello, my name is Marko Cen, I'm from China'
let bio = compile('Hello, my name is {{ name }}, I\'m from {{ country }}');
`
$3
`
javascript
import { schema } from 'benthos';
const ProfileSchema = schema({
name: '{{name}}',
age: '{{getAge}}',
gender: '{{gender(false)}}'
})
// profileData = {
// name: 'Micheal Smith',
// age: 43,
// gender: 'Male'
//}
let profileData = ProfileSchema({
getAge: function(){
return this.integer(25, 65);
}
})
``