iandotkelly / nlf

Node License Finder
MIT License
152 stars 41 forks source link

Deal with string values for package.json 'licenses' #21

Closed myndzi closed 9 years ago

myndzi commented 9 years ago

I realize this is invalid usage, but with some modules (looking at you cookie-parser), the author has put a string for 'licenses' instead of an array. This results in a rendered result like "I, M, MIT, T". It's an easy check for what could be a prevalent error, so makes sense to deal with appropriately here.

myndzi commented 9 years ago

There also appear to be some package.jsons that provide an object but not an array of objects, such as convict, that could be correctly deduced

iandotkelly commented 9 years ago

Thanks for the report. Fixed by https://github.com/iandotkelly/nlf/commit/019b6cbb32f9e705d47762db5b7747da8beb98ba

I've published this to npm as version 1.3.0. Thanks!