New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mobiusbye

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobiusbye

循环引用检测,找到对象中存在循环引用的属性

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

mobiusbye

对象循环引用检测,可以知道对象中哪两个属性发生了循环引用。

安装

npm i mobiusbye

使用

// ESM
import mobiusbye from 'mobiusbye';

// CommonJS
const mobiusbye = require('mobiusbye/release/commonjs/index').default;

const obj = {
  a: {
    b: {
      c: {
        d: {
          e: 1,
        },
      },
    },
  },
};

obj.a.b.c.d.e = obj as any;

mobiusbye(obj);

// 输出:
// {
//   path: [ [ 'a', 'b', 'c', 'd', 'e', 'a' ], [ 'a' ] ],
//   value: { b: { c: [Object] } }
// }

名称由来

再见莫比乌斯环。

Keywords

circular reference

FAQs

Package last updated on 28 Feb 2023

Did you know?

Socket

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.

Install

Related posts