@@ -12,9 +12,9 @@ const helper = {
1212 } ,
1313 assingAll : function ( targetObj , ...sourcObjs ) {
1414 // copy all enumerable and not enumerable properties into the target
15- sourcObjs . map ( ( sourcObj ) => {
15+ sourcObjs . forEach ( ( sourcObj ) => {
1616 const enum_only = Object . keys ( sourcObj ) ;
17- Object . getOwnPropertyNames ( sourcObj ) . map ( ( prop ) => {
17+ Object . getOwnPropertyNames ( sourcObj ) . forEach ( ( prop ) => {
1818 if ( enum_only . indexOf ( prop ) >= 0 ) targetObj [ prop ] = sourcObj [ prop ] ;
1919 else
2020 Object . defineProperty ( targetObj , prop , {
@@ -27,7 +27,7 @@ const helper = {
2727 } ,
2828 setNoneEnumProps : function ( obj , props ) {
2929 const noneEnum = { } ;
30- Object . keys ( props ) . map ( ( prop ) => {
30+ Object . keys ( props ) . forEach ( ( prop ) => {
3131 noneEnum [ prop ] = {
3232 writable : true ,
3333 value : props [ prop ] ,
@@ -38,7 +38,7 @@ const helper = {
3838 getArraysDiff : function ( arr1 , arr2 ) {
3939 const arr1Copy = [ ...arr1 ] ,
4040 arr2Copy = [ ...arr2 ] ;
41- arr1 . map ( ( item ) => {
41+ arr1 . forEach ( ( item ) => {
4242 if ( arr2 . indexOf ( item ) >= 0 ) {
4343 arr1Copy . splice ( arr1Copy . indexOf ( item ) , 1 ) ;
4444 arr2Copy . splice ( arr2Copy . indexOf ( item ) , 1 ) ;
0 commit comments