Comments (3)
I am not familiar/experienced enough to contribute to this issue, but I can share that the standard (non-ES6) way of using the module is still viable:
import lodash from 'lodash';
import deepdash from 'deepdash';
...
const _ = deepdash(lodash);
...
const result = _.filterDeep(_.merge( ... ));
...
hth
Update:
I stand corrected. This is well and good in development (we are using Typescript), but when I transpile with babel:
const lodashDeep = deepdash(lodash);
becomes:
const lodashDeep = (0, _deepdash.default)(deepdash.placeholder);
in compiled .js
, and at runtime I get this error:
ReferenceError: deepdash is not defined
Update 2 (and simple resolution):
A coworker pointed out that my babel config had the plugin babel-plugin-lodash
declared and that by removing it from babel config, the build included deepdash again. I haven't dug down to learn more, but I think I understand enough to know I have hijack OP's #116. I hope you still find this useful.
from deepdash.
I've got a similar issue when running the test with Jest (24.9.0) using either of those import statements
./node_modules/deepdash/es/eachDeep.js:2
import deps from './deps/eachDeep.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module
from deepdash.
Furthermore...
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /node_modules/lodash-es/lodash.js
require() of ES modules is not supported.
require() of /node_modules/lodash-es/lodash.js from /utils/seed.ts is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename lodash.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /node_modules/lodash-es/package.json.
from deepdash.
Related Issues (20)
- omitDeep changes input on empty array HOT 1
- omitDeep doesn't omit objects HOT 7
- how to remove values from json if they exist
- Feature Request Parent path
- filterDeep not working on deeply nested object HOT 2
- Working with promises HOT 2
- Frustrating that things like `pickDeep` and `filterDeep` can only return a nested structure HOT 3
- deepdash-es not working with jest-resolve HOT 9
- deepFilter keep parents
- ESM: IIterateeContext typescript interface not exposed
- findPathDeep doesn't return first Value path
- findDeep or findDeepValue - Return object that contains the key & value
- eachDeep with childrenPath == wrong parent, parent path etc
- Bug in documentation _.findDeep*
- findDeep return types problem HOT 3
- Add contributing docs HOT 1
- findDeep is not a function HOT 1
- explicit return values, why and how does this work HOT 1
- mapValuesDeep mutates the original object if `leavesOnly: false` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepdash.