Category "require"

why I can't get all folder's module with require('./folder')

i am using this: index.js functions └abc.js └reset.js functions.js functions.js const fs = require("fs") const functions_ = {} const files = fs.re

Require a class from another class - php

I'm learning PHP. And I have a problem that I can't understand. This my situation: I have a directory called Lib. This is the structure of my directory: In the

requiring a directory rather than a js file

I come across a piece code like this in an index.js file: exports = module.exports = require("./src") Not sure what the exports = module.exports bit means. And

How to use peerjs (import and require both fail)

I want to use peerjs in a script (that I use in a html file). When I try import Peer from "peerjs", I get an error saying "Cannot use import statement outside a

How to dynamically render a markdown file in Angular?

I'm trying to write an Angular component that renders markdown files as part of the webpage, using the ngx-markdown library. Looking at the library's official

Node js require code instead of file

I am trying to setup an interface, where I can write one js file that can be used on the server (nodejs) and on the client (javascript). An example file would

How to "require(module)" in mongo shell

I am writing a mongo shell script for data management. I want to write it using modular code that makes use of function libraries as modules. In some cases, m