DailyJS

Node Roundup: i18next, Sift.js, Comb

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

node modules translation

Node Roundup: i18next, Sift.js, Comb

Posted by Alex R. Young on .
Featured

node modules translation

Node Roundup: i18next, Sift.js, Comb

Posted by Alex R. Young on .
You can send in your Node projects for review through our contact form or @dailyjs.

i18next

i18next (GitHub: jamuhl / i18next-node, License: MIT, npm: i18next) by Jan Mühlemann is a library for supporting multiple languages in Node applications. I previously posted about i18next in the jQuery Roundup.

i18next supports the expected set of translation tools, like pluralized strings, variables, and nesting. This Node port adds much-welcomed features like Express middleware and template support.

To add the required helpers to an Express app, call i18next.registerAppHelper(app), then use a familiar t() function to access translations in templates. The author provides a Jade example, so fans of the authentic TJ Holowaychuk Express/Jade/Stylus stack should be happy.

Sift.js

sift.js (npm: sift) by Craig Condon is a MongoDB-inspired array filtering library. It's a bit like an alternative to Underscore for people who love MongoDB. Sift.js supports operators like $in and $gt, but can also filter arrays based on functions and even works with deeply-nested objects in arrays.

Craig has provided a few examples that should look familiar to Mongo users:

var sift = require('sift');

sift({ $in: ['hello','world'] }, ['hello','sifted','array!']);  
// ['hello']

Full documentation is included, covering all of the supported operators and deep searching.

Comb

Comb (License: MIT, npm: comb) by Doug Martin is a framework for Node that includes "frequently needed utilities", like logging tools, string and date formatting, flow control, and various collection algorithm implementations such as BinaryTree and PriorityQueue.

Every class provided by Comb has documentation at pollenware.github.com/comb. One of the interesting things I noticed about this project is the author claims 99% test coverage, so that fellow who filled out our JavaScript survey with "I code everything perfect on the first try" might want to check out the source.