
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Generate test data, company with tb-schema.
The base class.
console.log(mocker.constructors)
// [ 'Activity',
// 'Apprelation',
// 'Collection',
// 'Consumer',
// 'Customfield',
// 'Devicetoken',
// 'Entry',
// 'Event',
// 'Feedback',
// 'Integration',
// 'Member',
// 'Notice',
// 'Organization',
// 'Post',
// 'Project',
// 'Projecttemplate',
// 'Stage',
// 'Subscriber',
// 'Subtask',
// 'Smartgroup',
// 'Tag',
// 'Task',
// 'Tasklist',
// 'Team',
// 'Token',
// 'User',
// 'View',
// 'Work' ]
A example for User
:
mocker.user(): Return simple mocker user.
console.log(mocker.user())
// User {
// name: 'name0',
// email: 'email0@mocker.org',
// emails: [ { email: 'email0@mocker.org', state: 0 } ],
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// authUpdated: 1458818469463 }
mocker.user(obj): Return simple mocker user with custom data.
console.log(mocker.user({name: 'tester', email: 'tester@tb.com'}))
// User {
// name: 'tester',
// email: 'tester@tb.com',
// emails: [ { email: 'tester@tb.com', state: 0 } ],
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// authUpdated: 1458818487941 }
new mocker.User(): Same as mocker.user().
new mocker.UserModel(mocker.user()): Return mongoose user model.
console.log(new mocker.UserModel(mocker.user()))
// { emails:
// [ { _id: 56f25241d4d16b31888c0e80,
// state: 0,
// email: 'email0@mocker.org' } ],
// title: '',
// location: '',
// website: '',
// created: Wed Mar 23 2016 16:22:25 GMT+0800 (CST),
// updated: Wed Mar 23 2016 16:22:25 GMT+0800 (CST),
// isActive: false,
// isAdmin: false,
// isBlock: false,
// isPay: false,
// latestActived: null,
// hasLoginToday: false,
// hasLoginTalk: false,
// googleTwoFactor: null,
// signUpIP: null,
// signUpCity: null,
// lastEntered: {},
// _id: 56f25241d4d16b31888c0e7f,
// authUpdated: 1458721345492,
// password: 'sha1$303cee$d4b5b28cf8c06200000d890bd401a85a8b6556ed',
// email: 'email0@mocker.org',
// name: 'name0' }
FAQs
Generate test data, company with tb-schema.
The npm package tb-mocker receives a total of 0 weekly downloads. As such, tb-mocker popularity was classified as not popular.
We found that tb-mocker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.