object_setDefault

If object does not have key, add it.

Versión del día 03/06/2021. Echa un vistazo a la versión más reciente.

Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.greasyfork.org/scripts/427473/937455/object_setDefault.js

Autor
Bogudan
Versión
0.2
Creado
03/06/2021
Actualizado
03/06/2021
Tamaño
374 Bytes
Licencia
LGPLv3

Added method setDefault to object prototype.

function setDefault (key, value)

If object does not have key, add it with value value

key (string, required)
    key to check
value (any, optional, default = undefined)
    value for key if it's not present