
Security News
npm Introduces minimumReleaseAge and Bulk OIDC Configuration
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.
npm install
npm install gennifer --save
var gennifer = require( 'gennifer' );
var tweetTmpl = function() {
return {
user: '@recursivefunk',
text: 'I am the one'
};
};
gennifer
.registerTemplate( 'tweet', tweetTmpl )
// optional
.channel( anEventEmitter )
// will return the genrated data and automatically emit the new data
.generate( 'tweet' );
// in templates.js
// casual is the preferred underlying data generator but you can generate
// data with your templates in any manner you wish
var casual = require('casual');
module.exports = {
aTemplate: function() {
return {
dateFoo: casual.date,
aName: casual.name
}
}
}
// later...
gennifer.loadTemplates( './templates.js' );
var templates = gennifer.templates();
console.log( templates );
// { aTemplate: [Function] }
[sudo] npm install -g gennifer
genneifer [ -f 1000 -v 1 -p 8080 -t ]
Just type
genneifer -h
For available options
There's no good way to distinguish between a string that's a number and a date string. For Instance '1' is a "valid date", but in the context of an application, probably is not actually representative of any point in time. To remedy this, you'd have to override the property to manually set the data type. See usage below:
var obj = { foo: 'bar', created_at: 'Fri Oct 24 23:22:09 +0000 2008' };
var decoded = genneifer.resolveTypes( obj, { created_at: 'Date' } );
console.log( decoded ); // { foo: 'String', created_at: 'Date' }
When gennifer sees this property, she will use the overridden type. This obviously isn't the ideal situation as it forces you to at least know a bit about the data ahead of time, but such is the world in which we live.
You'll need to have redis running locally for all tests to pass
npm test
Check the issues section
FAQs
Fake social data generator
The npm package gennifer receives a total of 3 weekly downloads. As such, gennifer popularity was classified as not popular.
We found that gennifer 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
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.

Research
/Security News
Socket uncovered four malicious NuGet packages targeting ASP.NET apps, using a typosquatted dropper and localhost proxy to steal Identity data and backdoor apps.