Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
10 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
23 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
53 行
すべてコピー
16 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
48 行
すべてコピー
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,
コピー
コピー済み
コピー
コピー済み
displayErrors = this.displayErrors,
コピー
コピー済み
コピー
コピー済み
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),
コピー
コピー済み
コピー
コピー済み
body = opts.body || querystring.stringify(post),
env = {
env = {
REQUEST_METHOD: method,
REQUEST_METHOD: method,
コピー
コピー済み
コピー
コピー済み
CONTENT_LENGTH: body.length,
QUERY_STRING: query
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(
var command = util.format(
コピー
コピー済み
コピー
コピー済み
'
%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),
コピー
コピー済み
コピー
コピー済み
filePath
filePath
,
(typeof post == "string" ? util.format(" '%s'", post) : '')
);
);
コピー
コピー済み
コピー
コピー済み
child_process.exec(command,
function (error, stdout, stderr) {
child_process.exec(command,
{
env: env
},
function (error, stdout, stderr) {
if (error) {
if (error) {
コピー
コピー済み
コピー
コピー済み
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);
コピー
コピー済み
コピー
コピー済み
} else {
callback(null, null);
}
}
});
});
};
};
module.exports = engine;
module.exports = engine;
保存された差分
原文
ファイルを開く
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;
変更されたテキスト
ファイルを開く
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;
違いを見つける