es6 refactoring

This commit is contained in:
Hakim El Hattab
2020-03-07 11:58:18 +01:00
parent 4cfd254086
commit dd852851ef
2 changed files with 55 additions and 55 deletions

View File

@ -7,7 +7,7 @@
*/
export const extend = ( a, b ) => {
for( var i in b ) {
for( let i in b ) {
a[ i ] = b[ i ];
}
@ -57,7 +57,7 @@ export const deserialize = ( value ) => {
*/
export const distanceBetween = ( a, b ) => {
var dx = a.x - b.x,
let dx = a.x - b.x,
dy = a.y - b.y;
return Math.sqrt( dx*dx + dy*dy );