@hsds/helix v9.0.2-beta.3
Helix 💠
A fixture generator for Javascript, powered by Faker.
Helix allows you to quickly (and reliably) generate fixture data to be hydrated into Javascript components/views (like React, Vue, Backbone, etc…).
Install
npm install @hsds/helix --save-dev
Documentation
Check out our documentation for more info!
Basic usage
The createSpec
function is used to define your fixture spec. Helix comes with an adjusted version of Faker.js, which also needs to be imported. Note, the API for Helix's faker is the exact same as Faker.js.
import { createSpec, faker } from '@hsds/helix'
const CustomerSpec = createSpec({
id: faker.datatype.number()
fname: faker.name.firstName()
lname: faker.name.lastName()
company: faker.company.companyName()
})
const fixture = CustomerSpec.generate()
// Output
// {
// id: 12339041,
// fname: 'Alice',
// lname: 'Konigsberg',
// company: 'Smiths Co.'
// }
For a full list of Faker methods, check out their documentation.
6 days ago
17 days ago
19 days ago
20 days ago
1 month ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
7 months ago
9 months ago
6 months ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago