Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@drieam/bakker
Advanced tools
Bakker [ˈbakər] is a test library that generates models with randon data for Eduframe or Canvas
Install the @drieam/bakker and its dependencies.
yarn add @drieam/bakker
import * as bakker from '@drieam/bakker';
const user = bakker.user();
const arrayUsers = bakker.user.array(10);
const userPeter = bakker.user({
name: 'Peter'
});
Bakker.bake()
Bakker contains a generator to create new fakes base on your own custom models.
import * as faker from 'faker';
import models from '@drieam/models';
import bakker from '@drieam/bakker';
class Baker extents models.User {
public favouriteBread;
}
const baker = bakker.user({ favouriteBread: 'toasts' }, Baker);
const mybaker = baker();
// { favouriteBread: 'toasts', .... }
Or you can create your own constructor.
import * as faker from 'faker';
import models from '@drieam/models';
import bakker from '@drieam/bakker';
class Baker extents models.User {
public favouriteBread;
}
function defaultData() {
return {
favouriteBread: faker.random.arrayElement(['bread', 'appleflap', 'worstebroodje']);
}
}
const baker = bakker.baker(defaultData, Baker);
const mybaker = baker();
// { favouriteBread: 'toasts', .... }
We welcome all contributors who abide by our Code of Conduct. Please see the Contributors Guide for more details on submitting a PR, setting up a local dev environment, running tests, etc...
Until this project reaches a 1.0 milestone, minor version numbers will simply be incremented during each release. The Changelog will continue to document the different types of updates, including any "breaking changes".
After the 1.0 milestone, this project will follow SemVer.
FAQs
Default Drieam api wrapper
The npm package @drieam/bakker receives a total of 4 weekly downloads. As such, @drieam/bakker popularity was classified as not popular.
We found that @drieam/bakker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.