the-lopster-require
v0.0.2
Published
The-lopster polyfile to quickly use the library via require.
Downloads
5
Maintainers
Readme
the-lopster-require
The-lopster polyfile to quickly use the library via require.
Using
require("the-lopster-require")(...extensions: DB.Extensions[]);
The module exports a function that accepts a list of extensions. After calling the function, you can import files with extensions that were passed to the function as arguments, and they will be converted into an instance of the DB.DB class.
Example:
const {XML} = require("the-lopster/dist/cjs").default;
require("the-lopser-require")(XML);
const file = require("./path/to/file.xml");
console.log(file);
// an instance of the DB.DB class with an XML extension