https://github.com/pablopunk/import-url
Require node modules from a URL
https://github.com/pablopunk/import-url
Last synced: 11 months ago
JSON representation
Require node modules from a URL
- Host: GitHub
- URL: https://github.com/pablopunk/import-url
- Owner: pablopunk
- License: mit
- Created: 2017-06-22T21:21:21.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-08T15:16:34.000Z (almost 9 years ago)
- Last Synced: 2025-07-07T09:03:26.498Z (11 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/import-url
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# import-url
Require modules from any URL
## Install
```bash
npm install import-url
```
## Usage
```js
const foo = await require('import-url')('module.now.sh')
console.log(foo()) //=> 'awesome!'
```
Right now it doesn't support modules requiring other modules. So if your remote module does a `require()` it will fail.
## Contribute
Feel free to open an _issue_ or a _PR_.
## License
[__MIT license__](license)
## Related
This module used to be named `require-remote` and still still available [on npm](https://www.npmjs.com/package/require-remote).
## Author
|  |
| ----------------------------------------------------------------------------- |
| © 2017 [Pablo Varela](http://pablo.life) |