Tuesday, 15 March 2011

node.js - jquery-url in nodejs -



node.js - jquery-url in nodejs -

i'm trying port js code that's using jquery-url nodejs.

jquery-url used hostname of given url in way:

var host = $.url(url).attr('host');

my question is, there npm bundle of jquery-url? if not, existing bundle has functionality?

thanks in advance!

node.js has build in. see node documentation.

for example:

var url = require("url"); var host = url.parse('http://user:pass@host.com:8080/p/a/t/h?query=string#hash').host; console.log(host);

node.js npm

No comments:

Post a Comment