iandotkelly / nlf

Node License Finder
MIT License
153 stars 41 forks source link

Format in README does not matches actual one for programmatic use #49

Closed IlCallo closed 6 years ago

IlCallo commented 6 years ago

I'm using the package programmatically for a project which produces a page with all dependencies licenses. Problem is that in the README file it's written that "license" and "readme" sources shall have a "name" property, which I guess returns the license extracted from there, but in fact that property does not exists and the license is retrieved only from the package file.

Calling NLF from CLI shows all licenses correctly.

iandotkelly commented 6 years ago

You are correct - the function is called names and not name. I'll update the docs to reflect this.

I plan to totally rewrite this to improve the API for programmatic use - any suggestions welcome.

IlCallo commented 6 years ago

Great, with "names" it worked, ty :) It could be good idea to return directly the array, if it's not for performance reasons

iandotkelly commented 6 years ago

Glad to help.

Yeah, I have no idea why I did it that way, the programmatic api was a bit of an afterthought. I'll probably revise it as you suggest.