negate function part of http://amp.ampersandjs.com.
npm install amp-negate
See the documentation for more info.
Part of the amp project, initially created by @HenrikJoreteg.