npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tuxedo

v0.2.0

Published

Faker gets a suit and a mustache

Downloads

11

Readme

Tuxedo

Build Status

Faker goes hipster, gets a mustache and a suit.

Getting Started

Install the module with: npm install tuxedo

You can also install tuxedo as a global package and use it in the terminal.

npm install tuxedo -g

tuxedo -h
tuxedo -t template.jtpl -o output.json -c data.json

Examples

var tuxedo = require('tuxedo');

tuxedo.on('complete', function(result) {
    console.log(result);
});

tuxedo.fromFile(__dirname + '/users.jtpl');

users.jtpl

[
{{#repeat 13}}
{
  "_id":"{{uid 32}}",
  "_index":{{autoIncrement}},
  "name": "{{findName}}",
  "handle":"{{userName}}",
  "address": "{{streetAddress}}",
  "phone":"{{phoneNumber}}",
  "company":"{{companyName}}",
  "img":"{{avatar}}",
  "bio": "{{sentences 3}}"
}
{{/repeat}}
]

output:

[{
  "_id":"9hwh38gcy6oap9y0l72f6hos11e63tcj",
  "_index":1,
  "name": "Nicholas Kon",
  "handle":"danny.mclaughlin",
  "address": "288 Johnson Junctions Suite 092",
  "phone":"340-344-1635 x582",
  "company":"Pagac, Reichel and Nitzsche",
  "img":"https://s3.amazonaws.com/uifaces/faces/twitter/carlosjgsousa/128.jpg",
  "bio": "inventore ut ullam natus enim tempore dolorem aut veritatis et et id hic reprehenderit doloribus molestias quae reiciendis ad"
},
{
  "_id":"og1cj2lkjidpo76hek94jy6oy1t487bh",
  "_index":2,
  "name": "Olen Cormier",
  "handle":"reagan",
  "address": "85346 Stamm Ford Apt. 355",
  "phone":"958-198-9556",
  "company":"Abshire and Sons",
  "img":"https://s3.amazonaws.com/uifaces/faces/twitter/ciaranr/128.jpg",
  "bio": "quis dignissimos est voluptatem quaerat alias aut nulla eos illo et repellendus distinctio odio quod quis voluptas"
},
{
  "_id":"aftmqt4ec65r8kqast80fukgnj4vgp4y",
  "_index":3,
  "name": "Miss Camryn Wolf",
  "handle":"chyna",
  "address": "0704 Alden Roads Suite 338",
  "phone":"822-963-0852",
  "company":"Kunze-Hudson",
  "img":"https://s3.amazonaws.com/uifaces/faces/twitter/djsherman/128.jpg",
  "bio": "ea qui consectetur vel tempora dolor neque quod enim aut qui quisquam rerum ullam"
}]

TODOs

  • TODO Add solver to reference props in json structures
  • TODO ~~bin: Have default values~~
  • TODO bin: If no arguments and no default template.jtpl show help
  • TODO repeat take glue argument, so we can ignore it for CVS templates
  • TODO add country generator.
  • TODO replace helpers.repeat with handlebars-helpers-repeat
  • TODO Add name initials
  • TODO Add random string length

Check out http://chancejs.com/

TEMPLATES Consider templates taking an option hash instead of positional arguments. Instead of this:

"bio": "{{sentences 3 '.<br/>'}}"
"bio": "{{sentences 3 glue='.<br/>'}}"

Documentation

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2014 goliatone
Licensed under the MIT license.