New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

derp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

derp

Blog for win

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Derp

Do you want great profits? Make a blog! But how?? Magic.

var redis = require('redis').createClient();
var blog = require('derp');
blog.redis = redis;

There's your blog. Write a post dufas.

blog.save({
  id: 'best-post-ever',
  title: "my life",
  markdown: "makin' *mad stacks* bitches. markdown up in hurr",
  tags: ["gangsta life", "chillin"],
  published: new Date()
}, function (error) { ... });

Wtf do we do with that id?

blog.get('best-post-ever', function (error, post) {
  // lol, post.content is HTML, not markdown
  // how great is that
  put_post_on_the_browser_window(post);
});

All done! Oh snap, forgot to make a home page.

blog.page({page: 1, perPage: 10}, function (error, posts) {
  put_all_the_posts_on_the_browser_window(posts);
});

Regret that post? No problem.

blog.remove('best-post-ever', function (error) { ... });

BTW, your blog should maximize SEO:

blog.page({page: 1, perPage: 10, tag: "gangsta life"}, function (error, posts) {
  put_the_titles_on_the_sidebar_somewhere(posts);
});

blog.tags(function (error, tags) {
  // tags[0].tag
  // tags[0].count
});

Feeling special yet? Go make a blog you idiot!

TODO

  • Markdown in titles ?
  • Archive lists by year, month, day (doc)
  • Option for listing published/non-published (doc)

FAQs

Package last updated on 27 Jul 2012

Did you know?

Socket

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.

Install

Related posts