are-set
v1.0.3
Published
a function that returns if a key is in a object
Downloads
21
Maintainers
Readme
are-set
usage
import areSet, { areSetAndTheSameType } from "are-set"
const dataYouDontKnow = JSON.parse("{\"hello\": true}")
console.log(
"keys are in object",
// keys in string array
areSet(dataYouDontKnow, ["hello"])
)
cosnole.log(
"are in the object and the same type",
// [[key, type]]
areSetAndTheSameType(dataYouDontKnow, [["hello", "boolean"]])
)