Created
July 30, 2015 15:00
-
-
Save ArtskydJ/343fbb490713b5ee797b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get = require('simple-get') | |
var got = require('got') | |
var xhr = require('xhr') | |
var url = 'http://requirebin.com/lib/html-editor.js' | |
get.concat(url, exec('get')) | |
got(url, exec('got')) | |
xhr(url, exec('xhr')) | |
function exec(name) { | |
return function x(e, buf) { | |
var str = String(buf && buf.body) | |
console.log(name, e, typeof str, str.slice(0, 10)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment