cyclic

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.is

This function check if the passed object has circular dependencies and if so, returns where it has been found in the object

Params

  1. object*-Object

    The object to check

Return

  1. -String|false

    false if all is ok, a string that tells where the circular dep has been found if not

Example

import { isCyclic } from '@blackbyte/sugar/is';
const obj = { hello: 'world' };
obj.cyclic = obj;
isCyclic(obj);

Todo

  • testsnormal