If I understood you correctly, instaceof will be the answer.
You can do something like this:
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
var mycar = new Car('Honda', 'Accord', 1998);
var a = mycar instanceof Car; // returns true
var b = mycar instanceof Object; // returns true
As for exporting and importing, you need to define your object in one file and export it:
module.exports = function Car(make, model, year) {
//...
}
Then you import it in whichever file you want with
import Car from 'components/car'
where components/car is an example of your file where object Car is exported from, in this case Car.js which is located in directory components.