I have been developing an application using Typescript that gets compiled into node code. As such I prefer using import
statements to require
.
I have been attempting to use Lodash with Lodash-Deep, with their official documentation stating that usage should be: const _ = require("deepdash")(require("lodash"));
I wish to convert this into an import statement but have not seen anything like this before and can't find any information in Node docs that explain using require in this fashion.
Would anyone know how to do this or can point me towards the relevant resources so that my code can stay consistent.
The imported deepdash
is a function, and it's need to be called with lodash object as the parameter.
import lodash from "lodash"
import deepdash from "deepdash"
const _ = deepdash(lodash)
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments