Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
7 years ago
Diff never expires
Clear
Export
Share
Explain
7 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
46 lines
Copy
8 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
47 lines
Copy
import { inject as service } from "@ember-decorators/service";
import { inject as service } from "@ember-decorators/service";
import Component from '@ember/component';
import Component from '@ember/component';
import { action, wrapComputed, computed } from "@ember/object";
import { action, wrapComputed, computed } from "@ember/object";
import { isEmpty } from '@ember/utils';
import { isEmpty } from '@ember/utils';
import { task } from 'ember-concurrency';
import { task } from 'ember-concurrency';
import { filterByFilePath } from '../utils';
import { filterByFilePath } from '../utils';
export default class AddonSourceUsagesComponent extends Component {
export default class AddonSourceUsagesComponent extends Component {
Copy
Copied
Copy
Copied
visibleUsageCount = 25;
@tracked
visibleUsageCount = 25;
showUsages = false;
@tracked
showUsages = false;
usages = null;
usages = null;
regex = false;
regex = false;
fileFilter = null;
fileFilter = null;
@service codeSearch;
@service codeSearch;
Copy
Copied
Copy
Copied
@computed(
'visibleUsageCount',
'usages')
@computed(
'usages')
get visibleUsages() {
get visibleUsages() {
return this.usages.slice(0, this.visibleUsageCount);
return this.usages.slice(0, this.visibleUsageCount);
}
}
Copy
Copied
Copy
Copied
@computed(
'visibleUsageCount',
'usages')
@computed(
'usages')
get moreUsages() {
get moreUsages() {
return this.visibleUsageCount < this.usages.length;
return this.visibleUsageCount < this.usages.length;
}
}
@(task(function* () {
@(task(function* () {
let usages = yield this.codeSearch.usages.perform(this.addon.id, this.query, this.regex);
let usages = yield this.codeSearch.usages.perform(this.addon.id, this.query, this.regex);
this.set('usages', filterByFilePath(usages, this.fileFilter));
this.set('usages', filterByFilePath(usages, this.fileFilter));
}).drop())
}).drop())
fetchUsages;
fetchUsages;
@action
@action
toggleUsages() {
toggleUsages() {
Copy
Copied
Copy
Copied
this.
toggleProperty('
showUsages
');
this.
showUsages = !this.
showUsages
;
if (this.showUsages && this.usages === null) {
if (this.showUsages && this.usages === null) {
this.fetchUsages.perform();
this.fetchUsages.perform();
}
}
}
}
@action
@action
viewMore() {
viewMore() {
Copy
Copied
Copy
Copied
let newUsageCount =
this.visibleUsageCount +
25;
this.visibleUsageCount +
=
25;
this.set('visibleUsageCount', newUsageCount);
}
}
}
}
Saved diffs
Original text
Open file
import { inject as service } from "@ember-decorators/service"; import Component from '@ember/component'; import { action, wrapComputed, computed } from "@ember/object"; import { isEmpty } from '@ember/utils'; import { task } from 'ember-concurrency'; import { filterByFilePath } from '../utils'; export default class AddonSourceUsagesComponent extends Component { visibleUsageCount = 25; showUsages = false; usages = null; regex = false; fileFilter = null; @service codeSearch; @computed('visibleUsageCount', 'usages') get visibleUsages() { return this.usages.slice(0, this.visibleUsageCount); } @computed('visibleUsageCount', 'usages') get moreUsages() { return this.visibleUsageCount < this.usages.length; } @(task(function* () { let usages = yield this.codeSearch.usages.perform(this.addon.id, this.query, this.regex); this.set('usages', filterByFilePath(usages, this.fileFilter)); }).drop()) fetchUsages; @action toggleUsages() { this.toggleProperty('showUsages'); if (this.showUsages && this.usages === null) { this.fetchUsages.perform(); } } @action viewMore() { let newUsageCount = this.visibleUsageCount + 25; this.set('visibleUsageCount', newUsageCount); } }
Changed text
Open file
import { inject as service } from "@ember-decorators/service"; import Component from '@ember/component'; import { action, wrapComputed, computed } from "@ember/object"; import { isEmpty } from '@ember/utils'; import { task } from 'ember-concurrency'; import { filterByFilePath } from '../utils'; export default class AddonSourceUsagesComponent extends Component { @tracked visibleUsageCount = 25; @tracked showUsages = false; usages = null; regex = false; fileFilter = null; @service codeSearch; @computed('usages') get visibleUsages() { return this.usages.slice(0, this.visibleUsageCount); } @computed('usages') get moreUsages() { return this.visibleUsageCount < this.usages.length; } @(task(function* () { let usages = yield this.codeSearch.usages.perform(this.addon.id, this.query, this.regex); this.set('usages', filterByFilePath(usages, this.fileFilter)); }).drop()) fetchUsages; @action toggleUsages() { this.showUsages = !this.showUsages; if (this.showUsages && this.usages === null) { this.fetchUsages.perform(); } } @action viewMore() { this.visibleUsageCount += 25; } }
Find difference