https://github.com/ngot/circular_reference
https://github.com/ngot/circular_reference
circularreference fibjs js nodejs
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ngot/circular_reference
- Owner: ngot
- Created: 2018-02-01T10:15:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-03T10:40:48.000Z (over 8 years ago)
- Last Synced: 2025-07-31T15:50:48.917Z (11 months ago)
- Topics: circularreference, fibjs, js, nodejs
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Circular Reference
Circular reference in Node.js and Fibjs.
## Node.js
Just a note here. 🤣🤣🤣
node a.js
```shell
a1
b1
a is: {}
b2
b is: bbb
a2
```
## Fibjs
It is different in fibjs.
Let's have a look at the log:
fibjs a.js
```shell
a1
b1
a1
b is: {}
a2
a is: aaa
b2
b is: bbb
a2
```
It's because fibjs has the `run` mechanism which is different from Node.js.Fibjs won't cache the run entry file.
If you use `c.js` to bootstrap the program, the behavior will be the same.
fibjs c.js
```shell
a1
b1
a is: {}
b2
b is: bbb
a2
```