Category "javascript"

How to check if every properties in an object are null

I have an object, sometimes it is empty like so {} other times it will have properties that are set to null. { property1: null, property2: null } How can

Reference error window not defined error in Web3

Here is my code: import Web3 from './web3'; if (window.ethereum) { window.web3 = new Web3(ethereum); try { // Request account access if needed

Vue warning and component not showing while using v-form and v-text-field from Vuetify

I'm trying to use the v-form and v-text-field components from the Vuetify node package. <template> <v-form> <v-text-field label="Test" type

Get cookie of parent page (iframe) using JS

I need to get a cookie created in parent page. I need get a spesific cookie (example) who was cread on modiface--locatelcolomia.myvtex.com and used this on my

Cypress: How to know if element is visible or not in using If condition and xpath?

Cypress: How to know if element is visible or not in using If condition? The answer of the above question works perfectly for CSS selectors. The answer is cy.ge

Cypress: How to know if element is visible or not in using If condition and xpath?

Cypress: How to know if element is visible or not in using If condition? The answer of the above question works perfectly for CSS selectors. The answer is cy.ge

Discord.js Adding Emojis to a send message and grab the message id

Hey Stack Overflow Community, I have another question in regard to discord.js.I want to send a message and add an emoji to it, from which I later want to get th

Calculate spin frequency from rotation change in degrees

I have an object that rotates in the same direction at a variable speed. I have the ability to measure the angle of this object in degrees (0-360) every frame (

Force an existing user to sign-in with a specific account

Similar to Invoke "Verify it's you" authentication page from a Firebase application use case, but my case differs in that the user is not logged in, but I want

How to compare two Images using nodeJs? [closed]

Need to compare below image urls: https://cdn-image.foodandwine.com/sites/default/files/original-201404-HD-buckwheat-crepes.jpg https://test-

Copy to clipboard code in JavaScript doesn't work

I'm trying to write in javascript and I want to understand why it doesn't work? sample order code that I want to copy: 593004485164756431 when I copy to clipboa

How do I not allow special characters and space in react hook using yup

Here's the code: { label: "Name", name: "name", placeholder: 'Name', type: "text", rule: yup.string() .required('Name is a r

Run injected JavaScript script only once WKWebView web page has fully loaded

I want to run a particular script in WKWebView only once the webpage has fully loaded (including images). What I've been doing so far is running the function fu

Trying to change value of buttons

I'm trying to change the value of a button when I click on it, so what I did was I created a function in JavaScript where I call the ID of the element by gettin

Highcharts Error #16 But I'm not using Highstocks

I'm using multiple charts on the same page. I have a bar chart, an activity gauge chart and a map chart(they are loaded on different div ids). Everything was wo

Cannot find module web3

I simply am trying to import web3 to my project and for whatever reason I cannot seem to resolve the issue I am facing. The relevant code is posted below: Examp

Testing functions with arguments in React with Jest Enzyme

I have a function named toggleFilter() in a react component which looks like this: toggleFilter = (filterType, filterName) => { const filterApplied

CORS BLOCKED 'Access-Control-Allow-Origin' Firebase Functions not allowed

I had an error when sending data to a firebase database : Access to fetch at 'https://us-central1-pwagram-f39a5.cloudfunctions.net/storePostData' from origi

Node - Pushing array from JS to Node

Here's my app.js file: const express = require('express'); const app = express(); app.use(express.static(__dirname + '/assets')); app.set('view engine', 'ejs'

How to use localStorage variable in safe?

Iam tray to use isAuthenticated useState in all component to stop users traying to set url of any other component but I think it is not safe to storage