Diff
checker
Texto
Texto
Imagens
Documentos
Excel
Pastas
Legal
Enterprise
Aplicativo para desktop
Preços
Fazer login
Baixar o Diffchecker Desktop
Comparar texto
Encontre a diferença entre dois arquivos de texto
Ferramentas
Histórico
Editor live
Ocultar espaços em branco
Recolher inalteradas
Sem quebra de linha
Layout
Dividido
Unificado
Nível de detalhe
Inteligente
Palavra
Caractere
Estilos de texto
Alterar aparência
Realce de sintaxe
Escolher sintaxe
Ignorar
Transformar texto
Ir à primeira mudança
Editar entrada
Diffchecker Desktop
A maneira mais segura de usar o Diffchecker. Obtenha o aplicativo Diffchecker Desktop: seus diffs nunca saem do seu computador!
Obter Desktop
Untitled diff
Criado
há 10 anos
O diff nunca expira
Limpar
Exportar
Compartilhar
Explicar
23 remoções
Linhas
Total
Removido
Caracteres
Total
Removido
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
53 linhas
Copiar tudo
16 adições
Linhas
Total
Adicionado
Caracteres
Total
Adicionado
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
48 linhas
Copiar tudo
var path = require('path'),
var path = require('path'),
util = require('util'),
util = require('util'),
querystring = require('querystring'),
querystring = require('querystring'),
child_process = require('child_process');
child_process = require('child_process');
var engine = function (filePath, opts, callback) {
var engine = function (filePath, opts, callback) {
var binPath = this.binPath,
var binPath = this.binPath,
runnerPath = this.runnerPath,
runnerPath = this.runnerPath,
Copiar
Copiado
Copiar
Copiado
displayErrors = this.displayErrors,
Copiar
Copiado
Copiar
Copiado
method = opts.method || 'GET',
method = opts.method || 'GET',
get = opts.get || {},
get = opts.get || {},
post = opts.post || {},
post = opts.post || {},
query = opts.query || querystring.stringify(get),
query = opts.query || querystring.stringify(get),
Copiar
Copiado
Copiar
Copiado
body = opts.body || querystring.stringify(post),
env = {
env = {
REQUEST_METHOD: method,
REQUEST_METHOD: method,
Copiar
Copiado
Copiar
Copiado
CONTENT_LENGTH: body.length,
QUERY_STRING: query
QUERY_STRING: query
Copiar
Copiado
Copiar
Copiado
};
},
encodedEnv = [];
for (var key in env) {
if (env[key]) {
encodedEnv.push(util.format('%s="%s"', key, env[key]));
}
}
var command = util.format(
var command = util.format(
Copiar
Copiado
Copiar
Copiado
'
%s %s %s %s',
'
%s
%s %s %s %s',
(body
?
util.format('echo "%s" | ', body)
: ''
) +
binPath,
encodedEnv.length
?
'export ' + encodedEnv.join(' ') + ';'
: ''
,
binPath,
runnerPath,
runnerPath,
path.dirname(filePath),
path.dirname(filePath),
Copiar
Copiado
Copiar
Copiado
filePath
filePath
,
(typeof post == "string" ? util.format(" '%s'", post) : '')
);
);
Copiar
Copiado
Copiar
Copiado
child_process.exec(command,
function (error, stdout, stderr) {
child_process.exec(command,
{
env: env
},
function (error, stdout, stderr) {
if (error) {
if (error) {
Copiar
Copiado
Copiar
Copiado
callback(error);
// can leak server configuration
if (displayErrors && stdout) {
callback(stdout);
} else {
callback(error);
}
} else if (stdout) {
} else if (stdout) {
callback(null, stdout);
callback(null, stdout);
} else if (stderr) {
} else if (stderr) {
callback(stderr);
callback(stderr);
Copiar
Copiado
Copiar
Copiado
} else {
callback(null, null);
}
}
});
});
};
};
module.exports = engine;
module.exports = engine;
Diferenças salvas
Texto original
Abrir arquivo
var path = require('path'), util = require('util'), querystring = require('querystring'), child_process = require('child_process'); var engine = function (filePath, opts, callback) { var binPath = this.binPath, runnerPath = this.runnerPath, displayErrors = this.displayErrors, method = opts.method || 'GET', get = opts.get || {}, post = opts.post || {}, query = opts.query || querystring.stringify(get), body = opts.body || querystring.stringify(post), env = { REQUEST_METHOD: method, CONTENT_LENGTH: body.length, QUERY_STRING: query }; var command = util.format( '%s %s %s %s', (body ? util.format('echo "%s" | ', body) : '') + binPath, runnerPath, path.dirname(filePath), filePath ); child_process.exec(command,{ env: env }, function (error, stdout, stderr) { if (error) { // can leak server configuration if (displayErrors && stdout) { callback(stdout); } else { callback(error); } } else if (stdout) { callback(null, stdout); } else if (stderr) { callback(stderr); } else { callback(null, null); } }); }; module.exports = engine;
Texto alterado
Abrir arquivo
var path = require('path'), util = require('util'), querystring = require('querystring'), child_process = require('child_process'); var engine = function (filePath, opts, callback) { var binPath = this.binPath, runnerPath = this.runnerPath, method = opts.method || 'GET', get = opts.get || {}, post = opts.post || {}, query = opts.query || querystring.stringify(get), env = { REQUEST_METHOD: method, QUERY_STRING: query }, encodedEnv = []; for (var key in env) { if (env[key]) { encodedEnv.push(util.format('%s="%s"', key, env[key])); } } var command = util.format( '%s %s %s %s %s', encodedEnv.length ? 'export ' + encodedEnv.join(' ') + ';' : '', binPath, runnerPath, path.dirname(filePath), filePath, (typeof post == "string" ? util.format(" '%s'", post) : '') ); child_process.exec(command, function (error, stdout, stderr) { if (error) { callback(error); } else if (stdout) { callback(null, stdout); } else if (stderr) { callback(stderr); } }); }; module.exports = engine;
Encontrar Diferença