Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
s3.getBucketWebsite({ Bucket: config.domain }, function (err, website) { // eslint-disable-line handle-callback-err
var dirty = diff(website || {}, websiteConfig.WebsiteConfiguration)
if (dirty) {
putWebsite()
} else {
cb(null, parseWebsite(website, null, config))
}
})
}
listenerFlag = true;
document.addEventListener('seeduxRestore', (e) => {
next({
type: 'seedux_RESTORE',
restoreState: e.detail.restoreState,
});
}, false);
}
const newState = getState();
// this imported diff function returns undefined if no diffs are found,
// so we need to potentially assign an empty array instead to keep the shape
// of our HistoryEntries consistent
const diffs = diff(oldState, newState) || [];
const newHistoryEntry = {
originalAction: action,
modifiedAction,
newState,
diffs,
};
const evt = document.createEvent('CustomEvent');
evt.initCustomEvent('actionDispatched', true, true, newHistoryEntry);
document.dispatchEvent(evt);
return modifiedAction;
};
return obj;
}
console.log(chalk.bold('--- Starting new test ---'));
if (!lang || lang === 'all') {
} else {
require(`prismjs/components/prism-${lang}`);
const def = require(`${PKG_PATH}/${lang}`);
if (!Prism.languages[lang]) {
throw new Error(`${lang} not found in "Prism.languages"`);
}
const result = diff.diff(toObject(def[lang]), Prism.languages[lang]);
if (result === undefined) {
console.log(chalk.green(' Definitions Match!!! '));
return;
}
result.forEach(r => {
switch (r.kind) {
case 'D':
console.log(chalk.bgRed.black(' D '), chalk.red(`=> ${r.path.join('.')}`));
break;
case 'N':
console.log(chalk.bgGreen.black(' A '), chalk.green(`=> ${r.path.join('.')}`));
console.log('Value: ');
console.log(JSON.stringify(r.rhs, null, 2));
break;
const diffToTerm = (actual, expected) => {
const diffs = diff(actual, expected);
return flatten(diffs.map(x => {
const path = (x.path || []).join('.') + ':';
switch (x.kind) {
case 'E':
return [
chalk.gray(`In ${path}`),
chalk.green(` + ${JSON.stringify(x.lhs)}`),
chalk.red(` - ${JSON.stringify(x.rhs)}`),
''
];
case 'N':
return [
chalk.gray(`In ${path}`),
chalk.red(` - ${JSON.stringify(x.rhs)}`),
''
.map(function (remote) {
const localSkills = this.serverless.service.custom.alexa.skills;
const local = localSkills.find(skill => skill.id === remote.skillId);
let ret;
if (!(typeof local === 'undefined')) {
ret = {
skillId: local.id,
diff: diff(remote.manifest, local.manifest),
};
}
return BbPromise.resolve(ret);
})
.then(ret => BbPromise.resolve(ret.filter(v => !(typeof v === 'undefined'))));
element.steps.forEach(function(step) {
if (typeof step.result.duration === 'number' && step.result.duration > 0) {
step.result.duration = '{duration}';
}
if (step.match && typeof step.match.location === 'string') {
step.match.location = '{location}';
}
});
});
}
});
normalizeJsonFeatureOrder(expectedJson);
normalizeJsonFeatureOrder(actualJson);
var differences = DeepDiff.diff(actualJson, expectedJson);
if (differences) {
var transformedDifferences = [];
differences.forEach(function(difference) {
var path = '';
difference.path.forEach(function(pathPart) {
path += '/' + pathPart;
});
transformedDifferences.push({
kind: difference.kind,
path: path,
lhs: difference.lhs,
rhs: difference.rhs
static deepDiff(oldValue, newValue) {
return deepDiff(oldValue, newValue);
}
_formHasChange() {
const previousForm = generateForm(this.appDetail)
return !!diff(this.state.form, previousForm)
}
_textFieldChange(name, value) {
diff: function() {
return diff(this.__origData, this.__data);
},
_save= function (obj,isCreate,isAggregate)
{
var _keys= _.keys(obj),
_omit= ['_old','_table'],
diffs= diff(obj._old || {},
obj,
function (path,key) { return key=='_old'; });
if (!diffs || diffs.length==0
|| (obj._old || {_rev: 0})._rev