kessler / license-report

create a short report about a project's dependencies (license, url etc)
MIT License
227 stars 39 forks source link

actually maintain uniqueness in package index #1

Closed ArielBadichi closed 10 years ago

ArielBadichi commented 10 years ago

Before, it would've added a package unless it was a duplicate of the first one in the array.

In JavaScript, the "double-tilde idiom" produces results similar to the floor function, but not quite. It also produces bewilderment in the mind of a programmer unfamiliar with JS minutiae. It's best to avoid it.

kessler commented 10 years ago

it was meant as !~

I've only recently started using this idiom (only in another project actually) but I see it is not a good one. (x.indexOf('y') > -1) is probably better