DailyJS

Node Roundup: 0.10.7, JSON Editor, puid, node-mac

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

JSON mac node modules windows uuid

Node Roundup: 0.10.7, JSON Editor, puid, node-mac

Posted by Alex R. Young on .
Featured

JSON mac node modules windows uuid

Node Roundup: 0.10.7, JSON Editor, puid, node-mac

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

Node 0.10.7

Node 0.10.7 was released last week. This version includes fixes for the buffer and crypto modules, and timers. The buffer/crypto fix relates to encoding issues that could crash Node: #5482.

JSON Editor Online

JSON Editor Online

JSON Editor Online (GitHub: josdejong / jsoneditor, License: Apache 2.0, npm: jsoneditor, bower: jsoneditor) by Jos de Jong is a web-based JSON editor. It uses Node for building the project, but it's actually 100% web-based. It uses the Ace editor, and includes features for searching and sorting JSON.

It's installable with Bower, so you could technically use it as a component and embed it into another project.

english-time

Azer Ko├žulu sent in a bunch of new modules again, and one I picked out this time was english-time (GitHub: azer / english-time, License: BSD, npm: english-time). He's using it with some of the CLI tools he's written, so rather than specifying a date in an ISO format users can express durations in English.

The module currently supports milliseconds, seconds, minutes, hours, days, weeks, and shortened expressions based on combinations of these. For example, 3 weeks, 5d 6h would work.

puid

puid (GitHub: pid / puid, License: MIT, npm: puid) by Sascha Droste can generate unique IDs suitable for use in a distributed system. The IDs are based on time, machine, and process, and can be 24, 14, or 12 characters long.

Each ID is comprised of an encoded timestamp, machine ID, process ID, and a counter. The counter is based on nanoseconds, and the machine ID is based on the network interface ID or the machine's hostname.

node-mac

node-windows provides integration for Windows-specific services, like creating daemons and writing to eventlog. The creator of node-windows, Corey Butler, has also released node-mac (GitHub: coreybutler / node-mac, License: MIT, npm: node-mac). This supports Mac-friendly daemonisation and logging.

Services can be created using an event-based API:

var Service = require('node-mac').Service;

// Create a new service object
var svc = new Service({  
  name: 'Hello World',
  description: 'The nodejs.org example web server.',
  script: '/path/to/helloworld.js')
});

// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install', function() {  
  svc.start();
});

svc.install();  

It also supports service removal, and event logging.