/**
 * Created by yee.wang on 2019-02-28
 **/ import { IDriver } from "../Interface/IDriver" ; export abstract class Vmo { /**
     * 数据存储驱动器
     */ protected static driver : IDriver ; param data protected load ( data ) { Object . keys ( data ) . forEach ( key => { if ( this [ "__proto__" ] . hasOwnProperty ( key ) ) { this [ key ] = data [ key ] ; } } ) ; return this ; } constructor ( data ? ) { if ( data !== undefined ) { this . load ( data ) ; } } public toJs ( ) { const keys = Object . keys ( this ) ; const object = { } ; keys . forEach ( key => { if ( ! /^(function|undefined)$/ . test ( typeof this [ key ] ) ) { object [ key ] = this [ key ] ; } } ) ; return object ; } }