Write .has()

This commit is contained in:
marleyrae 2023-06-27 18:39:00 -07:00
parent fba7363fa4
commit 3b69d25b8d

View file

@ -38,5 +38,11 @@ _.pad = function (string, length) {
return ' '.repeat(addToStart) + string + ' '.repeat(addToEnd) return ' '.repeat(addToStart) + string + ' '.repeat(addToEnd)
} }
/* ----------------------------------------------------------------- has ---- */
_.has = function (obj, key) {
return !!obj[key]
}
// Do not write or modify code below this line. // Do not write or modify code below this line.
module.exports = _ module.exports = _