
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
deep-inspect
Advanced tools
A function to inspect inherited properties as well
npm install deep-inspect
The second argument to this function will be an options
object. It
accepts the following values. Please note that all are optional fields.
showHidden
depth
parentChainLevel
See below for explanations of the options.
showHidden
Setting this option to true
will show all the enumerable properties of the
object. Normally, when you iterate an object with a for..in
loop or with
Object.keys
, the non-enumerable properties will not be shown.
This must be a boolean value and the default value is false
.
depth
If the object is nested structure or the object has many child properties then
setting this option to a valid positive 32 bit integer value, will list all the
properties of the nested structure as well, till the level specified by depth
is reached.
This must be a valid 32 bit integer value and the default value is 1
.
parentChainLevel
This option allows to explore the inheritance chain as well. It will go to the
depth mentioned in parentChainLevel
and list down all the properties of all
the objects on the way.
There is no default value, but if not provided this will be ignored and none of the parent objects in the prototype chain will be inspected.
var inspect = require('deep-inspect');
inspect(1);
// 1
inspect('thefourtheye');
// "thefourtheye"
inspect();
// undefined
var inspect = require('deep-inspect');
inspect([]);
// []
inspect({});
// {}
inspect({1: '2'});
// Object
// └─┬ Key: "1"',
// └── "2"'
var inspect = require('deep-inspect');
var a = {};
Object.defineProperties(a, {
one: {enumerable: true, value: 'one'},
two: {enumerable: false, value: 'two'},
});
inspect(a, {showHidden: true});
// Object
// ├─┬ Key: "one"
// │ └── "one"
// └─┬ Key: "two"
// └── "two"
inspect(a);
// Object
// └─┬ Key: "one"
// └── "one"
var inspect = require('deep-inspect');
function Parent() {}
Parent.prototype.name = 'Parent';
function Child() {}
Child.prototype = Object.create(Parent.prototype);
Child.prototype.constructor = Child;
inspect(new Child(), {parentChainLevel: 4});
// Object
// └─┬ [[Parent]] : Object
// ├─┬ [[Parent]] : Object
// │ ├─┬ [[Parent]] : Object
// │ │ └── [[Parent]] : null
// │ └─┬ Key: "name"
// │ └── "Parent"
// └─┬ Key: "constructor"
// └── [Function Child]
FAQs
Inspect inherited properties. Inspired by Node.js's util
The npm package deep-inspect receives a total of 1 weekly downloads. As such, deep-inspect popularity was classified as not popular.
We found that deep-inspect 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.