7,001 questions
2
votes
1
answer
89
views
lodash throttle doesn't do anything: no output, no errors
Could anyone tell me why this code doesn't work?
html
<html>
<head>
<script src="https://cdn.jsdelivr.net/lodash/4.6.1/lodash.min.js"></script>
<script type="text/...
0
votes
0
answers
163
views
Conflict between lodash.js and underscore.js
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 ...
1
vote
1
answer
119
views
types/lodash giving error After Upgrade to angular 7 from 4
I have an angular and nodejs project that I recetly upgraded to angular 8. Although everything seems to be running, the compile fails due to types/lodash errors shown below.
The erro I an getting is:
...
0
votes
1
answer
63
views
Method to overwrite all properties of dest obj from source object
I would like to overwrite all properties of an object dest by reading their values from a source object source, when they exist. I wonder whether a method in Lodash exists that does exaclty this:
...
0
votes
0
answers
85
views
Error importing lodash in components when using Histoire
I'm using lodash for a number of things, and all works well. That is, until I try to write stories in Histoire. Everything works, except for lodash. Anytime a component uses lodash, I get one of ...
0
votes
0
answers
37
views
JSPM Install command does not download dependencies in "overrides" section mentioned in project root/package.json
I (new to js) need to do a security fix regarding a transitive dependency in one of our projects. The lodash transitive dependency version in babel-core dependency is being highlighted as version that ...
0
votes
1
answer
92
views
npm run build is failing due to @types.lodash-es incompatability
These are the errors I'm facing in Angular 7:
22:12:30 node_modules/@types/lodash/common/collection.d.ts(753,33): error TS2304: Cannot find name 'PropertyName'.
22:12:30 node_modules/@types/lodash/...
0
votes
1
answer
77
views
Passing a constructer as a parameter as if it were a regular function in JavaScript?
I am using ANTLR 4, and it is common to instantiate a class and immediately pass it as the argument of the next class' constructor, as per the docs for the ANTLR 4 JavaScript target:
import antlr4 ...
-2
votes
2
answers
70
views
Strange behavior when deep cloning dynamic objects
I have been trying to deep clone a dynamic object in typescript and all methods just return an empty {} object for this specific scenario!!
Here is the type of object I am trying to deep clone
...
-1
votes
1
answer
181
views
Is there any way to use Lodash in node.js without installing any npm packages?
I tried way too much things, and all of them failed:
const _ = require('lodash');
import _ from 'lodash';
import 'lodash';
const _ = require('https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js')...
0
votes
1
answer
27
views
How to setvalue of a textarea instant and call api after 2 second for efficiency
I've a textarea and I'd like to udpate text area text instantly as user enter text but I don't like to hit api after every keystroke for obvious reason for efficiency.
I've tried to use debounce ...
1
vote
1
answer
81
views
What is this transpiled code in my react application?
In my React application, I'm using the lodash function set like this:
set(objectToSet, fieldInObjectToSet, valueToSet);
When I look at the transpiled code, I see that this line gets converted to this:...
1
vote
1
answer
231
views
does not provide an export named 'isEqual' | Angular
import { isEqual } from 'lodash';
onSave() {
const isFormsEqual = isEqual(
this.loyaltyRewardsFormFacade.currentRewardsState(),
this.loyaltyRewardsFormFacade.transformFormData()
);...
-2
votes
1
answer
93
views
Lodash failed to format string if it contains roman numbers
I'm trying to format string using Lodash camelCase function, but it's modifying content itself
_.camelCase("Gladiator II");
'gladiatorIi'
How can I do this properly?
0
votes
1
answer
90
views
Using a propertyPath object in typescript doesn't seem to recognise properties within an array
So I am looking at this piece of code that seems like it never worked. It's basically finding a path in a json and updating its values.
So it uses lodash and when I did into it, the type it is ...