Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
153 views

I am working on integrating a plugin into my application which resulted in lodash.js and underscore.js conflict. I have underscore.js implemented in my entire application and this plugin which I am ...
Gaurav's user avatar
  • 192
1 vote
2 answers
51 views

I have a inherited a system that utilizes a Backbone collection of files that needs to be sorted based on a series of values. The order variable is saved when you slide different files into a position ...
xtine.k's user avatar
  • 39
1 vote
0 answers
38 views

I am using backbone js as frontend in rails 7 application. In index.html file I have called backbone main file. code is coming in this file. But here I have initialise router file. In which getting ...
Divya Keswani's user avatar
0 votes
0 answers
33 views

I use the underscore library to copy objects, the _.clone() method. And this method works differently on different versions of angular, or maybe the problem is something else? F.e: class FooBar { ...
Euphoria's user avatar
0 votes
1 answer
344 views

I am working on a exercise based of the underscore _.throttle function. Our function is slightly modified as we have the return the last computed result if the _.throttle function is still waiting to ...
Niels Koop's user avatar
0 votes
1 answer
61 views

I have an array of object with data: items = [ { ....someFields timeFrom: { hour: 17, minute: 15 } }, { ....someFields timeFrom: { hour: 12, ...
Arams's user avatar
  • 199
0 votes
1 answer
35 views

I have an array of objects - say, NFL teams. Each object (team) has a property - array of first names of team players. var nflTeams = [ { name: 'Kansas City Chiefs', playersFirstNames: ['Shane', ...
curious_orange's user avatar
0 votes
3 answers
89 views

I have two objects: const people = [ { name: "Dave", fruit: ["apple", "pear"], veg: ["asparagus", "peas"] }, { name: "Frank",...
Hayley's user avatar
  • 321
1 vote
2 answers
36 views

How to group the matching data in array of object and get the matching data length to get the average value. var getdataObj = [{ "finalUrl": "https://www.amazon.in/", "fetchTime": "2022-10-...
sathish kumar's user avatar
1 vote
1 answer
83 views

I'm using a custom widget in Jupyter. After upgrading to a new machine it stopped functioning. Checking the javascript console in the browser window running the notebook I see the error ReferenceError:...
John's user avatar
  • 893
1 vote
2 answers
137 views

I have an array var data = {email: '[email protected]', phone: '3434344332', firstName: 'john', lastName: 'Doe'}; How do i remove one or more elements from the array? I Tried _.without( data, data....
johnmills's user avatar
0 votes
4 answers
202 views

I have an array of objects where each index is one week where I bought groceries. Meaning that array[0] is the first week, array[1] is the second and the so on. What I need to do is do sum all the ...
Shan's user avatar
  • 3
2 votes
1 answer
747 views

I understand how a simple lodash merge works but as I was playing around with it to try more complicated scenarios I got confused about how the output is being formed for instance: const a = [{ h: 1, ...
j obe's user avatar
  • 2,097
0 votes
1 answer
63 views

I have a situation where i need to find the duplicate element in array of object. Object contains 4 properties { id:"1", userName:"userName", name:"name1", address:"...
venkatraman hiregange's user avatar
1 vote
3 answers
152 views

considering var desserts = [ { name: 'Chocolate Cake', ingredients: ['cocoa', 'flour', 'sugar', 'eggs', 'milk', 'butter' ], type: 'cake' }, { name: 'Snickerdoodles', ...
boshao13's user avatar
1 vote
2 answers
544 views

I try to use the modular import from the underscore in a typescript app like this: import map from 'underscore/modules/map' It works and does the job, but cause the below error: Cannot find module '...
marzzy's user avatar
  • 794
0 votes
2 answers
158 views

I'm trying to recreate the functionality of the underscore _.invoke for learning purposes and I would like to really understand how it works as it seems to be something not too complicated. The ...
dr3nan's user avatar
  • 47
0 votes
3 answers
57 views

Given an object searchable, is there a simple way of returning all the id values using lodash or underscore.js (or equivalent) where I can define the path to id? const searchable = { things: [ ...
jeeves's user avatar
  • 2,031
0 votes
1 answer
296 views

I am trying to recreate .invoke() function. I am able to call the function, but struggling with passing the arguments. I tried using call and apply, but couldn't make it work. Here is my code: _....
vadim-nest's user avatar
-1 votes
1 answer
115 views

So on internet they solve using: from functools import reduce fib = lambda n: reduce(lambda x, _: x+[x[-1]+x[-2]],range(n-2), [0, 1]) print(fib(5)) Fibonacci program I don't understand what's the ...
exmeta's user avatar
  • 3
1 vote
1 answer
644 views

this is my first question and I hope I am not coming up with something totally stupid. I am new to JS and Node.js. I can solve easy issues on my own, but with this pollution report I need some advice. ...
Klaus53123's user avatar
1 vote
2 answers
654 views

I have some ionic segment buttons that essentially act as toggle switches. I'm trying to limit the rate at which the effects of the toggles can be switched/selected) and have tried Debounce & ...
Phill Healey's user avatar
  • 3,200
2 votes
3 answers
4k views

I have a deeply nested data structure and I am interested in matching a certain value inside my array (and array of arrays) and then pushing some data inside an accompanying array. For example ...
Ara's user avatar
  • 63
3 votes
1 answer
5k views

I'm getting this error when I copy-paste the underscore.js to my console. Error screenshot "Uncaught SyntaxError; Unexpected token 'export'" I tried on both Chrome Version 100.0.4896.127 and ...
seckin.furkan's user avatar
1 vote
1 answer
346 views

I've been trying to rewrite the _.defaults method from underscore.js and I keep getting this error: should copy source properties to undefined properties in the destination object‣ AssertionError: ...
Robert R's user avatar

1
2 3 4 5
115