Category "javascript"

What is the meaning of empty export {} in vanilla javascript/HTML

In the Google Maps Javascript API example, I see they had something like this in the HTML: <script type="module" src="./index.ts"></script> and an

How do I specify the types for the content (values) of a JS object (i.e. map)?

I want to specify that a Javascript Object, used as a map, contains only a certain type. For example: function doSomethingWithUrlQueryParams(queryObj: Obje

How do I specify the types for the content (values) of a JS object (i.e. map)?

I want to specify that a Javascript Object, used as a map, contains only a certain type. For example: function doSomethingWithUrlQueryParams(queryObj: Obje

firebase.firestore.FieldValue.arrayUnion is not a function

I'm trying to update an array in my firestore, i followed the documentation provided by Google (https://firebase.google.com/docs/firestore/manage-data/add-data

Flatpickr set minDate and maxDate dynamically by other field value in field setting without custom JS

How could I set the minDate of a "end date" field to by dynamically bigger than the "start date" field by references to the start date input id without custom J

How to fix error "Failed to compile : ./node_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41)"

I am trying to create a react-typescript app along with leaflet. I used the command, npm install leaflet react-leaflet @types/react @types/leaflet --save to ins

Discord.js not logging in

I cannot figure out why my bot is not working. Can someone please tell me why it is not logging in?? It shows the logo (the last console.log line), but does not

MAC M1 Something went wrong installing the "sharp" module

Running npm run dev (gatsby develop) on MacBook Pro M1 chip exit with Error: Something went wrong installing the "sharp" module Running npm run dev MacBook P

Get real IP address of a request instead of Cloudflare's IP address

Cloudflare changes the IP addresses of incomming requests because Cloudflare is a middleware between my website and the Internet, a proxy. How should I get the

React - How to filter a list without losing data?

I'm able to filter the list to display the items I want. The problem is, my method of filtering actually alters the list rather than just display the items I'm

File upload with Multer and Uppy

I'm using Uppy as my drag and drop file upload, but as we all know that Uppy doesn't take care of actually uploading it to the server. Therefore, I am using Mul

Image contour tracing: Jacob's stopping criterion issue

I am trying to adopt Moore-Neighbor contour tracing algorithm in my JavaScript project and at the moment I'm reading this tutorial on contour tracing: http://ww

Vue3 Manually Render Slot Content

I'm trying to parse out the contents of a slot and render the contents in multiple places. The idea is to create a wizard that allows each step to be contained

Continuous/constant autoplay speed with iDangerous Swiper

I want to achieve a continuous/constant speed while autoplaying through the slides. It is easy by just setting the CSS transition-timing-function of .swiper-wra

Vue3 Manually Render Slot Content

I'm trying to parse out the contents of a slot and render the contents in multiple places. The idea is to create a wizard that allows each step to be contained

findOneAndUpdate is not a function of mongoose

I know this question has been answered before but I can't seem to implement the changes into what im working with. I'm trying to create a daily command that rew

Axios Uncaught TypeError: Cannot read property 'map' of undefined

I'm trying to display data from my API in a React App with Axios. I've created a simple method that connects to the REST API. import axios from 'axios'; cons

Checking the package.json version number on new Pull Requests

Is there any way to check the version number in package.json to make sure it was changed as part of the pull request requirements?

node_modules/@types/react/index"' has no default export

Trying to convert a React app over into Typescript and running into strange errors. node_modules/@types/react/index"' has no default export. node_modules/@type

In JavaScript, how to execute next function from an array of functions

I have an array of functions, as in: funcArray = [func1, func2, func3]; When in a given function, I want to execute the next function in the array. How do I