Posts

Showing posts from January, 2019

Upgrading Lodash from 3.x to 4.x

Spanish version / Versión en Español There are many breaking changes from version 3.x to 4.x; all changes are detailed in the Lodash changelog . There is also a list of deprecated functions , with a regex you can use to detect usages in your code. However, since it is not an exhaustive list, I will list the changes I encountered when performing my own migration, to help anyone undergoing the same process. Direct renames This section includes functions in which only the name changed, i.e. the arguments and return value are the same. 3.x 4.x contains includes first head rest tail invoke invokeMap padLeft padStart padRight padEnd Direct renames if not using thisArg This section includes functions in which the only change is dropping "thisArg". If you are not using it, you can just rename. If you are using thisArg in 3.x, it can be dropped if you are using iteratee to acce

Actualizando Lodash de 3.x a 4.x

Versión en inglés / English version Hay varios cambios que rompen código de la versión anterior al pasar de Lodash 3.x a 4.x; todos los cambios están detallados en el registro histórico de cambios de Lodash . Además, hay una lista de funciones obsoletas ( deprecated ) , con una expresión regular para encontrar usos de las mismas en tu código. Sin embargo, dado que ambos recursos no son exhaustivos, listaré los cambios que encontré al realizar mi propia migración, a fin de ayudar a quien atraviese el mismo proceso. Cambios de nombre directos Esta sección incluye funciones donde sólo el nombre cambió, vale decir, los argumentos y retorno son los mismos que en 3.x. 3.x 4.x contains includes first head rest tail invoke invokeMap padLeft padStart padRight padEnd Cambios de nombre directos (en caso de no usar thisArg) Esta sección incluye funciones en donde el único cambio es quitar el