pcjs/my_modules/shared/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeff Parsons f2e092e57c Demonstration of C1Pjs loading and running *without* a web server
file:///pcjs/configs/c1p/machines/8kb/large/debugger/demo.html (your root directory may vary)
2014-10-29 16:41:32 -07:00
..
component.js Some improvements to Debugger message support 2014-10-15 16:14:54 -07:00
defines.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
diskapi.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
dumpapi.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
embed.js Display progress messages as machine XML files are being loaded/processed 2014-10-29 15:23:35 -07:00
externs.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
netlib.js Fixed localStorage availability test (for real this time), and asynchronified embed.js 2014-10-28 17:12:24 -07:00
nodebug.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
proclib.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
README.md Final preparations for open source roll-out 2014-10-12 00:08:15 -07:00
reportapi.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
sockets.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
strlib.js "Fake" XDF disk support works now 2014-10-27 22:20:41 -07:00
userapi.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
usrlib.js Final preparations for open source roll-out 2014-10-12 00:08:15 -07:00
weblib.js Demonstration of C1Pjs loading and running *without* a web server 2014-10-29 16:41:32 -07:00

Shared Sources

This folder contains a mix of shared code, with some files used only by Node (server) modules, some used only by Browser (client) modules, and others used by both.

At the moment, only a few files are completely agnostic; eg: strlib.js and usrlib.js. One give-away is that neither contain references to any globals (although references to each other would be fine).

netlib.js is appropriate only for Node modules, because it contains code that relies on Node's global Buffer object, as indicated by:

/* global Buffer: false */

And weblib.js is appropriate only for client modules, because it contains code that relies on the browser's global window object, as indicated by:

/* global window: true */

We declare window modifiable (true) so that defines.js can set global.window to false when running within Node, allowing any other code to test the existence of window with a simple:

if (window) {...}

instead of:

if (typeof window !== "undefined") {...}