pcjs/modules/shared/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2016-05-16 20:55:32 -07:00
..
component.js Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86 2016-05-16 20:55:32 -07:00
defines.js Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86 2016-05-16 20:55:32 -07:00
diskapi.js Try to be more consistent when referring to disks vs. drives (eg, Drive Controllers, not Disk Controllers) 2016-05-01 13:47:58 -07:00
dumpapi.js Try to be more consistent when referring to disks vs. drives (eg, Drive Controllers, not Disk Controllers) 2016-05-01 13:47:58 -07:00
embed.js Starting work on disambiguating PCjs the emulator from PCjs the project/website; the emulator will become PCx86 2016-05-16 20:55:32 -07:00
externs.js More support for saving entire machines 2016-02-16 18:11:15 -08:00
netlib.js Replaced loadResource() with the more streamlined getResource(), for all your resource-getting needs (well, except for binary files, which should be coming soon) 2016-02-21 15:51:54 -08:00
nodebug.js Some Jekyll tweaks for developer/debug mode 2016-02-09 14:55:16 -08:00
private.js Add support for --private to server.js (for my private builds only) 2016-04-14 22:56:51 -07:00
proclib.js Updated Computer constants 2016-01-16 14:37:39 -08:00
README.md Last of the link fixes (I hope) 2015-07-19 09:07:50 -07:00
reportapi.js Updated Computer constants 2016-01-16 14:37:39 -08:00
save.js Tweaks for the last two pull requests 2016-03-23 17:18:52 -07:00
sockets.js Updated Computer constants 2016-01-16 14:37:39 -08:00
strlib.js Copyright symbol work-around 2016-02-17 13:58:42 -08:00
userapi.js Updated Computer constants 2016-01-16 14:37:39 -08:00
usrlib.js Copyright symbol work-around 2016-02-17 13:58:42 -08:00
weblib.js More redirects and some API tweaks 2016-04-07 08:29:54 -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 */

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") {...}