Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isThis(init, name) {
if (!isMemberExpression(init))
return;
const {
object,
property,
} = init;
return isThisExpression(object) && isIdentifier(property, {name});
}