How to update a dependency loaded in an NPM package

Solution for How to update a dependency loaded in an NPM package
is Given Below:

npm audit is flagging trim-newlines as needing an update. It’s installed under npm-check > meow > trim-newlines.

What I see in that folder is v1 of that package. But at the root of my project (same level as npm-check) is v4 of trim-newlines.

How does one properly update the dependencies of a package like npm-check to make sure it is using the desired version of trim-newlines?