Bind classes to Global Scope in ES6
问题 i'm trying to recreate jQuery validator in ES6 without using any jQuery, and i've kinda hit a roadblock in trying to recreate it's functionality for adding validation methods by using the Global scope , that is if you call Validator.addMethod anywhere, it'll run the associated function in the Validator and add a method to the Validator . I can't seem to do this in ES6 since i'm not allowed to export my class to the Global scope, my class is never accessible from the window object , like for