Skip to content

Tag: javascript

How to refer a variable in Node.js from another file

I am using node.js to build an app where I have a lot of static text (may change over months) in the code. I want to move the text in a separate file and refer that file data as a variable in the handler file. E.g. The above is original file code. What I want to do is move the

Regex: To allow commas in excel file name

I have JavaScript code that reads the content of an excel file. The first step is to assign a regex to a variable of the name regex Then some programming occurs like: At times users submit excel files that in their names, they put commas, and that breaks the regex. I would like to ask for help so that I

clone 1 row of divs with another on click

I have 2 rows. Each row has 3 individual DIVs that can be selected (Clicked) by the user. When the the user clicks on any of the DIVs on the first row, there is styling in CSS to change the colour of the individual DIV (column if you like) I would like the corresponding DIV (column) in the 2nd row

Add functions in other folder, to an object in this folder

I want to create an object that would import functions from another folder and it would look something like this: The functions would be inside of a different folder, however, I want to make some sort of importer in which it would make new classes for each new function/file it finds inside of the folder. some…