Skip to content
Snippets Groups Projects

Auth

Merged Lucas Gabriel Lima requested to merge auth into development
2 files
+ 59
50
Compare changes
  • Side-by-side
  • Inline
Files
2
/* These classes are defined to allow checking of location type with the
instanceof operator. */
class Location
class Location {}
// Location types
class City extends Location{
class City extends Location {
constructor(id) {
super();
this.id = id;
}
}
class State extends Location{
class State extends Location {
constructor(id) {
super();
this.id = id;
}
}
class Region extends Location{
class Region extends Location {
constructor(id) {
super();
this.id = id;
}
}
const locations = { city: City, state: State, region: Region };
const locations = {
location: Location,
city: City,
state: State,
region: Region };
module.exports = locations;
Loading