DailyJS

DailyJS

The JavaScript blog.


Tagcompression
Featured

node modules build compression

Node Roundup: 0.8.23, indev, compressjs

Posted on .

You can send in your Node projects for review through our contact form.

Node 0.8.23

In case you haven't switched to 0.10 yet, Node 0.8.23 was released yesterday. This version adds bug fixes for the http, tls, child_process, and crypto modules.

indev

indev (GitHub: azer / indev, License: BSD, npm: indev) by Azer Koçulu is a lightweight alternative to Makfiles. It supports "Devfiles" which can be written in either CoffeeScript or JavaScript, and includes shortcuts for lots of shell commands through ShellJS.

The inclusion of ShellJS makes it feel closer to make than Grunt, so if Grunt isn't quite what you want then indev might be what you're looking for.

compressjs

compressjs (GitHub: cscott / compressjs, License: GPLv2, npm: compressjs) by C. Scott Ananian features several compression algorithms, implemented in pure JavaScript. It can run in browsers, and includes bzip2, LZP3, a modified LZJB, PPM-D, and an implementation of Dynamic Markov Compression.

The readme includes benchmarks for each algorithm, and a script is included so you can use it to compress things on the command-line.

Featured

databases node modules express middleware compression

Node Roundup: thin-orm, node-tar.gz, connect-bruteforce

Posted on .

You can send in your Node projects for review through our contact form or @dailyjs.

thin-orm

thin-orm (License: MIT, npm: thin-orm) by Steve Hurlbut is a lightweight ORM module for SQL databases with a MongoDB-inspired API:

var orm = require('thin-orm');

orm.table('users')  
   .columns('id', 'login', 'firstName', 'lastName', 'createdAt');

It's designed to be used with existing libraries, like pg and sqlite3, so you'll need one of those modules installed to use it.

thin-orm currently supports the following features:

  • Filtering
  • Sorting
  • Pagination
  • Joins
  • Optional camelCase property-to-field mapping
  • SQL injection protection

Steve has included Nodeunit tests that cover the basic functionality, and some integration tests for PostgreSQL and SQLite.

node-tar.gz

node-tar.gz (License: MIT, npm: tar.gz) by Alan Hoffmeister is a tar helper module and command-line utility, built with Node's zlib module, tar, and commander.

The module can be used to easily tar and compress a folder, and it will install a targz script that supports the zxvf flags. There are also Vows tests.

connect-bruteforce

connect-bruteforce (License: GPLv2, npm: connect-bruteforce) by Pedro Narciso García Revington provides middleware that can help prevent bruteforce attacks. It will add a small delay to requests when an attack is detected.

The author has written a useful example that requires captcha validation after a successive number of validation failures: express-recaptcha.

For a simpler example, see express-hello-world.

The project includes Mocha tests.