Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (17 sloc) 0.492 kB
#! /usr/bin/env node
var Hook = require('hook.io').Hook,
Levenshtein = require('levenshtein');
var levenshtein = new Hook( {
name: 'levenshtein'
});
levenshtein.connect({
port: 5000,
host: "localhost"
});
levenshtein.on('ready', function(){
levenshtein.once('in.getDistance', function (event1, event2, data){
var lev = new Levenshtein(data.stringOne, data.stringTwo);
levenshtein.emit('out.getDistanceResponse', lev.distance);
console.log(lev.distance);
});
});
Jump to Line
Something went wrong with that request. Please try again.