mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-08 20:07:50 -04:00
6 lines
336 B
Plaintext
6 lines
336 B
Plaintext
Polyglot provides a registry of file types that can be loaded by calling
|
|
its improved version of 'require'. Each file extension that can be handled
|
|
by a custom loader is registered by callingPolyglot.register("ext", <class>),
|
|
and then you can simply require "somefile", which will find and load
|
|
"somefile.ext" using your custom loader.
|