bsdfzzzy / vue2-hammer

Hammer.js wrapper for Vue 2.x to support some touching operation in the mobile.
MIT License
253 stars 48 forks source link

Lodash dependency missing in package.json #8

Closed gerardo-rodriguez closed 6 years ago

gerardo-rodriguez commented 6 years ago

Thanks for this Vue Hammer plugin! I was trying it out and it seems to be what I was needed. 😉

One question, I see that lodash is a dependency but it is not listed as a dependency in the package.json file. 🤔

gerardo-rodriguez commented 6 years ago

After digging in a bit more, I'm curious if you need the lodash import at all? 🤔

Instead of:

if (!isEmpty(direction)) {
  ...
}

Could you do this?

if (Object.keys(direction).length) {
  ...
}