pcjs/modules/shared/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2017-02-06 17:37:12 -08:00
..
component.js More scripting fixes 2017-02-06 17:37:12 -08:00
debugger.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
defines.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
diskapi.js Support for RX11 diskette drives has been added, but is still untested 2017-02-02 15:14:13 -08:00
dumpapi.js v1.32.0: The New Year Release 2016-12-30 15:56:01 -08:00
embed.js The first PDPjs script is operational (see /devices/pdp11/machine/1170/panel/debugger/xxdp) 2017-02-05 13:49:30 -08:00
externs.js v1.32.0: The New Year Release 2016-12-30 15:56:01 -08:00
keys.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
netlib.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
nodebug.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
private.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
proclib.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
README.md Fixed READMEs for shared folders 2017-01-31 16:09:32 -08:00
reportapi.js v1.32.0: The New Year Release 2016-12-30 15:56:01 -08:00
save.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
sockets.js v1.32.0: The New Year Release 2016-12-30 15:56:01 -08:00
state.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
sticky.js The first PDPjs script is operational (see /devices/pdp11/machine/1170/panel/debugger/xxdp) 2017-02-05 13:49:30 -08:00
strlib.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
userapi.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
usrlib.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00
weblib.js Unforked the shared modules -- ES6 is now the default 2017-01-31 13:50:55 -08:00

layout title permalink
page Shared Modules /modules/shared/lib/

Shared Modules

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