Category "javascript"

rambda is missing sortWith

I really like rambda (vs ramda), however I faced the function sortWith is missing and that is even not mentioned in spec. Is there any way to get a similar func

Upgrading Jest to v28 - Error Test environment jest-environment-jsdom cannot be found

Has anyone successfully upgraded to latest Jest version 28.0.0? I'm receiving an error: Error: Test environment jest-environment-jsdom cannot be found. Make sur

how to alter reduce function so it produce different result

I have this array: data: [ '+section1+', 'big text 1 here.', 'big text 2 here followed by list:', '-this is list item;', '-this is another list item;'

Why is a _react-native-otp-verify_ library call throwing an 'is not a function' error?

I am trying to use a ReactNative package, react-native-otp-verify to implement automatic SMS verification. At this point, I am getting an error though, that I n

Supabase and Google Apps Script

Is it possible to use Supabase with Google Apps Script (GAS)? I'm new to Supabase and I've never tried to import external library to GAS before. I'm planning to

Lower the variable without impact database variable

I would like to know if it is possible to lower the quantity without touching the database because here I would like the quantity variable to decrease but witho

protected router with react-router v6

this Protected route is works well for profile page. but i want to make a protected route for multiple page. in my project , i want to implement protected route

How does function within addEventListener gets hoisted?

I found a weird behavior that I couldn't understand even reading MDN doc about hoisting. It says that functions and variables gets moved to the top of the scope

codewars Array.diff javascript

this is my first question as I'm learning programming for few days but now and I'm stuck Task: Your goal in this kata is to implement a difference function, wh

How to use a loop inside a slick slider in Vue.js

I'm using vue-slick link https://www.npmjs.com/package/vue-slick inside a bootstrap modal and when i use a v-for loop to loop through the items it display's thi

how to pass a variable to REST API with NodeJS

I must use NodeJs to set different API routes to provide front-end functionalities. I have designed the server as : routes=> controller => models The snip

cypress test asserting a filtering operation on array of objects expecting undefined

I have a cypress test over an API. When I do cy.getUnits(u.email) I'm expecting a 200 OK response similar to this in the body of the response {   &ld

Is it possible to stroke "transparent" with SVG.js?

I'm using SVG.js and want to draw an invisible border around a shape. I use the stroke() method to do this, and I thought just setting the opacity option to 0 w

Discord.js: Is there any possible way of disabling a menu after selecting one of it's options?

I've very recently had a look at buttons for my discord bots, and in doing so I also discovered the menus that you can create. I want to know how, if it's possi

Deprecation notice: ReactDOM.render is no longer supported in React 18

I get this error every time I create a new React app: Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to

Why are my Filepond uploads not working on Android devices only?

I am currently using Filepond to upload images to an S3 bucket. This functionality works great on a computer or on iOS devices but refuses to work on Android de

Set bootstrap switch component to 'checked' if mode is Dark

I have a theme for my web App in my localStorage and I want to add the checked value to the Switch component if the mode is set to 'dark',or unchecked, if the m

How to reorder an API call to a custom order by API ID?

A bit of a niche question but it has challenged me, see if you can solve it. I have this array of sports leagues ranked from best to worst by their respective A

send previous messages in group chat

I work at a chat application. I want to store messages in an object like this : { 'room1': ['msg1', 'msg2', ...] 'room2': ['msg3', 'msg4', ...] ... } I d

Sorting array of object in JavaScript

I have this array of objects with an n and an o property holding an integer. And I want to sort it by ascending value of the n property, and if two elements hav