object_setDefault

If object does not have key, add it.

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/427473/937466/object_setDefault.js

作者
Bogudan
版本
0.5
创建于
2021-06-03
更新于
2021-06-03
大小
500 字节
许可证
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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址