
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
object-looks-like
Advanced tools
An utility function for comparing if object A looks like object B.
objectLooksLike is not shallow comparing nor deep comparing object A and object B. Rather, it iterates properties of object B and checks if they are matching object A properties.
const objectLooksLike = require('./index');
const objectA = {
name: 'Mike',
age: 21,
height: '180cm',
weight: '60kg',
hobbies: ['basketball', 'football', 'swimming'],
parent: {
name: 'Daniel',
age: 55,
height: '175cm',
weight: '50kg',
hobbies: ['reading'],
parent: null,
},
};
const objectB = {
name: 'Mike',
age: 21,
hobbies: ['basketball', 'football', 'swimming'],
parent: {
name: 'Daniel',
age: 55,
},
};
// Returns true because objectB is a subset of objectA.
objectLooksLike(objectA, objectB);
const objectC = {
name: 'Mike',
age: age => age < 50, // value can be a function
parent: {
name: 'Daniel',
age: 55,
},
};
// Returns true because objectC is a subset of objectA.
objectLooksLike(objectA, objectC);
const objectD = {
name: 'Mike',
age: 21,
parent: {
name: 'Sam', // unmatching property value
age: 55,
},
};
// Returns false because objectD has unmatching property value.
objectLooksLike(objectA, objectD);
const objectE = {
name: 'Mike',
age: 21,
skin: 'white', // unknown property
parent: {
name: 'Daniel',
age: 55,
},
};
// Returns false because objectE has unknown property.
objectLooksLike(objectA, objectE);
FAQs
An utility function for comparing if object A looks like object B.
We found that object-looks-like demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.