This file contains hidden or 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
function nodeToString ( node ) { | |
var tmpNode = document.createElement( "div" ); | |
tmpNode.appendChild( node.cloneNode( true ) ); | |
var str = tmpNode.innerHTML; | |
tmpNode = node = null; // prevent memory leaks in IE | |
return str; | |
} | |
//http://stackoverflow.com/questions/4239587/create-string-from-htmldivelement |
This file contains hidden or 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 glob = require('glob'); | |
var path = require('path'); | |
var sep = process.platform != 'win32' ? '\\' : '/'; | |
console.log(sep); | |
var patterns = ['**/*.js', '**\\*.js']; | |
patterns.map(function(pattern){ | |
var tmp = pattern.split(sep).join(path.sep); | |
console.log(pattern); | |
console.log(tmp); |