1
1
/*!
2
- * Vuex v0.4.1
2
+ * Vuex v0.4.2
3
3
* (c) 2016 Evan You
4
4
* Released under the MIT License.
5
5
*/
6
6
( function ( global , factory ) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? factory ( exports ) :
8
- typeof define === 'function' && define . amd ? define ( [ 'exports' ] , factory ) :
9
- ( factory ( ( global . Vuex = global . Vuex || { } ) ) ) ;
10
- } ( this , function ( exports ) { 'use strict' ;
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) :
8
+ typeof define === 'function' && define . amd ? define ( factory ) :
9
+ ( global . Vuex = factory ( ) ) ;
10
+ } ( this , function ( ) { 'use strict' ;
11
11
12
12
var babelHelpers = { } ;
13
13
babelHelpers . typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) {
364
364
this . _setupModuleMutations ( modules || this . _modules ) ;
365
365
}
366
366
367
+ /**
368
+ * Replace entire state tree.
369
+ */
370
+
371
+ } , {
372
+ key : '___replaceState' ,
373
+ value : function ___replaceState ( newState ) {
374
+ var state = this . _vm . _data ;
375
+ var clone = deepClone ( newState ) ;
376
+ Object . keys ( clone ) . forEach ( function ( key ) {
377
+ state [ key ] = clone [ key ] ;
378
+ } ) ;
379
+ }
380
+
367
381
/**
368
382
* Attach sub state tree of each module to the root tree.
369
383
*
491
505
override ( Vue ) ;
492
506
}
493
507
494
- // also export the default
495
508
var index = {
496
509
Store : Store ,
497
510
install : install ,
498
511
createLogger : createLogger
499
512
} ;
500
513
501
- exports . Store = Store ;
502
- exports . install = install ;
503
- exports . createLogger = createLogger ;
504
- exports [ 'default' ] = index ;
514
+ return index ;
505
515
506
516
} ) ) ;
0 commit comments