add API for programmatic smfgen
fix jsstyle nit; update package.json