How to use the empty function from lodash

Find comprehensive JavaScript lodash.empty code examples handpicked from public code repositorys.

201
202
203
204
205
206
207
208
209

function destroyService(fn) {
  const service = getService(fn);
  if (service) {
    service.cleanup();
    _.empty(service);
    _.remove(services, (s) => s === service);
  }
}
fork icon0
star icon0
watch icon0

+ 2 other calls in file

Other functions in lodash

Sorted by popularity

function icon

lodash.get is the most popular function in lodash (7670 examples)