mattburns / exiftool.js

A pure javascript implementation of exiftool
MIT License
64 stars 13 forks source link

why do you use "!!" ? #30

Open vsimko opened 6 years ago

vsimko commented 6 years ago

https://github.com/mattburns/exiftool.js/blob/24361008c35ab8434fc21e017687a9e76e0ed3b4/exiftool.js#L678-L680

why not just his ?

        function imageHasBeenScanned(oImg) {
            return oImg.imageScanned
        }

same for: https://github.com/mattburns/exiftool.js/blob/24361008c35ab8434fc21e017687a9e76e0ed3b4/exiftool.js#L674-L676

mattburns commented 6 years ago

Hmm, inherited code I'm afraid. It's a (pretty ugly) way to ensure something is boolean (or coerce an object into a boolean). I'm not attached to it so if the code still behaves without it I'm happy.