File tree Expand file tree Collapse file tree 3 files changed +393
-489
lines changed
Expand file tree Collapse file tree 3 files changed +393
-489
lines changed Original file line number Diff line number Diff line change 1- import EmberObject from '@ember/object' ;
1+ export class Person {
2+ constructor ( { name, ssn } ) {
3+ this . name = name ;
4+ this . ssn = ssn ;
5+ }
26
3- export const Person = EmberObject . extend ( {
47 isEqual ( other ) {
58 return this . ssn == other . ssn ;
6- } ,
7- } ) ;
9+ }
10+ }
811
912const matchingSSN = '123-45-6789' ;
1013
11- export const alice = Person . create ( { name : 'Alice' , ssn : matchingSSN } ) ;
12- export const alice2 = Person . create ( { name : 'Alice 2' , ssn : matchingSSN } ) ;
13- export const bob = Person . create ( { name : 'Bob' , ssn : '999-99-9999' } ) ;
14+ export const alice = new Person ( { name : 'Alice' , ssn : matchingSSN } ) ;
15+ export const alice2 = new Person ( { name : 'Alice 2' , ssn : matchingSSN } ) ;
16+ export const bob = new Person ( { name : 'Bob' , ssn : '999-99-9999' } ) ;
You can’t perform that action at this time.
0 commit comments