Skip to content

Commit

Permalink
bringing in lots of work from before
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Sep 24, 2012
1 parent bdd6381 commit 8cfbdeb
Show file tree
Hide file tree
Showing 571 changed files with 144 additions and 66,589 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,2 +1,4 @@
test_confs.js
*.sublime*
node_modules/
sauce_connect.log
14 changes: 12 additions & 2 deletions models/post.js
Expand Up @@ -28,9 +28,9 @@ Post.prototype.validate = function(fn){


Post.prototype.update = function(data, fn){
this.updatedAt = new Date;
this.updatedAt = new Date();
for (var key in data) {
if (undefined != data[key]) {
if (undefined !== data[key]) {
this[key] = data[key];
}
}
Expand All @@ -41,6 +41,16 @@ Post.prototype.destroy = function(fn){
exports.destroy(this.id, fn);
};

Post.prototype.excerpt = function() {
return this.body.substr(0, 100) + '...';
};

Post.prototype.body_nl2br = function() {
var str = this.body.replace(/\n/, '<br/><br/>', 'm');
//return str.replace(/\n/, '<br/>', 'm');
return str;
};

exports.count = function(fn){
fn(null, Object.keys(db).length);
};
Expand Down
1 change: 0 additions & 1 deletion node_modules/.bin/express

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/jade

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/nopt

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/vows

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/wd

This file was deleted.

286 changes: 0 additions & 286 deletions node_modules/argparser/ArgParser.js

This file was deleted.

22 changes: 0 additions & 22 deletions node_modules/argparser/LICENCE

This file was deleted.

0 comments on commit 8cfbdeb

Please sign in to comment.