{"_id":"@cnbritain/merlin-www-js-utils","_rev":"172-c1ab37aab52c59f061ef1370727eaae8","name":"@cnbritain/merlin-www-js-utils","dist-tags":{"lerna-temp":"1.5.2-alpha.de38a0a8","canary":"1.7.1-alpha.118","next":"3.0.0-alpha.1","latest":"3.0.1"},"versions":{"1.0.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.0.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.0.1","maintainers":[{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"432cb4a58cf9bcd3bf258c9bf11f34330be5064e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.0.1.tgz","integrity":"sha512-IGdcbKHwS6buG3j6LEuauGhUYVgFc7IOUq2GmGtOuVugj9e9+8YeZut5ffJJbyERiZ+hDVtYbOtOYCs36YohMg==","signatures":[{"sig":"MEYCIQCU3MnQG/UXaWxcxji8yFix3JxkbSOChWeOeO55Sh9mHAIhAOyT6FEFqETbgOKIYeMoeDBH4CscpVffd+QIyjn+z7U8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","_from":".","_shasum":"432cb4a58cf9bcd3bf258c9bf11f34330be5064e","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"4.1.2","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.1.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.0.1.tgz_1487854955769_0.852624524384737","host":"packages-18-east.internal.npmjs.com"}},"1.0.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.0.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.0.2","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"62e8d4cdb7eed5fca8f2d4bf21f7c0111931775f","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.0.2.tgz","integrity":"sha512-CRM0O6OV25NnOu2QfWiJzA+3x2A0PSbQiXRpNnguB16hZ/CJuPK30P1WumrQoJXZJ9dhGzb7phHjYzhMSppkrw==","signatures":[{"sig":"MEUCIQDNRS84FEMilF2aiqBfCXj0fsi/6665R/8quTSUeY8uZQIgZMKt53aQH5VJZDIg+ElSHfGdoHBm2hRbrWp0dztbEzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","_from":".","_shasum":"62e8d4cdb7eed5fca8f2d4bf21f7c0111931775f","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"4.4.4","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.1.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.0.2.tgz_1493219693779_0.4738885806873441","host":"packages-18-east.internal.npmjs.com"}},"1.1.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.1.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.1.0","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"aebed6292682c792f35690a68688e268ef40b93f","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.1.0.tgz","integrity":"sha512-6c5vFMrpUx98KBzmpMbVs45MB5zzxf3LygrijvA0LpW6kUAC1hmXjkuJtMMgVcqeynaV29p5ChlYBJncg7IPNg==","signatures":[{"sig":"MEUCIDtUAdbqcvT5jHlpUk+xsQQ28s/wkstGygceyLLl9XH9AiEA8JtVCkS9N9MLB5hWk02f83n9eETev6I2xkN20/FU0IY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","_from":".","_shasum":"aebed6292682c792f35690a68688e268ef40b93f","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"4.6.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.4.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.1.0.tgz_1496157511065_0.1540958082769066","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.2.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.2.0","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"97efa8ba2d93222481cc83e8f41209094d81f6a8","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.2.0.tgz","integrity":"sha512-gcYQZ5nTifwoEAgLKXU+vL+7bMtHIIkpxBl2yyjOze+ARFdztsjTwSTxAfeJsGtcohqo6uD5mTBOCygZVZ3xSA==","signatures":[{"sig":"MEUCIDzhQwskyHn1F/UkbxxAdzkW8bKSizOkU1eT23VV6sn3AiEA1b0McHVJlMfv3kdIvTpLlx833wbVIldiMr8LXKvCPvs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.0.3","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.2.0.tgz_1498217155512_0.2053914307616651","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.2.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.2.1","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"c77ea114feec1fb5ddaab9eaa8d8f52514c9bfd2","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.2.1.tgz","integrity":"sha512-ZenUguHGvBSaywM1TpvKgdZmgWG3Q798l+ZS3n0FWWjbTclTZWsdXQ+KnebrcqlzrVuyuFUlpjv2SOVaV9kIvw==","signatures":[{"sig":"MEUCIQD6jhZFd3OUbSNclBer19bgN+32CXmNoMwfHmSFQRqRbwIgbcSvtV9f4XfXtdlu2hpvi/vC/TdSQYdHwBSIqM6sovM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.0.3","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.2.1.tgz_1498217623174_0.9287562302779406","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.2.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.2.2","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"9ef892b93a1fd269260cb25e67523029f7b408c5","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.2.2.tgz","integrity":"sha512-16I6PwGFf1ob43wWtSgBo+xQ1jF3mEF6qPRMBKbFvgrC1nHNQaLzDoiZqpHRYrl5legyNad0q3im8RgqJWf08w==","signatures":[{"sig":"MEUCIF3Y+7g4BipljPoe7cJ9Sj8MpdE/d07GR0EukhRRmM2CAiEAn0UtTX+aPnHgr/j+aKdCm8DJCFI4YAYYUoSx9eWEZYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.0.3","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.2.2.tgz_1500638779083_0.5881147054024041","host":"s3://npm-registry-packages"}},"1.3.0-alpha.8c4d0183":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.8c4d0183","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.8c4d0183","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"98928edbf3ad7c8cc952bdda4e56d5c640dbdf04","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.8c4d0183.tgz","integrity":"sha512-P+yf+OdpuTkp39VlQ/Lo6ADYZlr/2+v8QUE7XJU7CiqnhT9CGeKxxakTr1l2AL/E92Mp5eyNc2Naezu7ZlQqAw==","signatures":[{"sig":"MEQCIATmgVT87dLaQnaQv3+72jCtSDyv82aaD0IfXnpn4LyLAiBTO7ee6VA/YQMMiOksika1gOZ5mnKW42GGOqHfPQGJ6g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.10.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.8c4d0183.tgz_1501665771694_0.24085013871081173","host":"s3://npm-registry-packages"}},"1.3.0-alpha.0bab8950":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.0bab8950","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.0bab8950","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"fa0dd5c47b0326225977849223535c3305dc241f","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.0bab8950.tgz","integrity":"sha512-LN88hFN9H4VRbqkxZriSsPDTkEupWs03KdC2qRTNUD67dK06XB2GgnKXKwDT9TYpeqmDkDJ4lxhxnkoSK17BOA==","signatures":[{"sig":"MEYCIQCYptrCYKXc8HZKqpSD5wz0FIeUe/Hc2UQMevP1ihHouwIhAMOIIyqnnjvJK7nmOGf/USNi4Wt1AXDW1V4GmRcYX9S4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.10.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.0bab8950.tgz_1501666504099_0.12033544341102242","host":"s3://npm-registry-packages"}},"1.3.0-alpha.325733d4":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.325733d4","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.325733d4","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"1414525dfb2b3c68710911eba62947d7798d5ddb","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.325733d4.tgz","integrity":"sha512-AlF9EZQAkfmqn2vcXRluGYmWxp7ew1Yf9/2FFDt13FMoCFO0hswOEdugHpg2IRPTq0viR9wyj4GWFz3+dF+w/g==","signatures":[{"sig":"MEQCICivEMxxJvXDwb2pOsW9J20e5pj+DAz3qyxRSzmTTbi9AiBls9TxkbJswnmApx/8ErxjYxj3z0kX0ZLH+PpQRWE3Pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.10.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.325733d4.tgz_1502116735435_0.24716542614623904","host":"s3://npm-registry-packages"}},"1.3.0-alpha.6db8a6f4":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.6db8a6f4","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.6db8a6f4","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"aa212dbab541d84ba4c8d63873a2a1d592bf9a23","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.6db8a6f4.tgz","integrity":"sha512-KIktNffYaDyFOjPbcUfW3Dlg15wmRpGbvJtsiAP1vuXdojhD3JpfGlzY5tRsehH3jFg3QV2j6QvyFLbro+c8tQ==","signatures":[{"sig":"MEUCIA7uo8c1SS8WzKxV+txMK8tMp1mUy8ccmltZKPmhkwIKAiEAym2R9U2cydkrl+Baex0yoFQTYGHVevVTord8GSB0KNE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.6db8a6f4.tgz_1505311173550_0.6505515060853213","host":"s3://npm-registry-packages"}},"1.3.0-alpha.4b03bd5e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.4b03bd5e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.4b03bd5e","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"9488b80572bdec8ca4362f38518ac75b38ca9444","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.4b03bd5e.tgz","integrity":"sha512-O9/TGmQwVN/gLeZv5T0gNafV/jToqiuvuAtRSCrA/1fvsXhxAWDlo4ixbp1OJiUNo1QBQzMeLK557BK4uFizlQ==","signatures":[{"sig":"MEYCIQCH2SlGN0FYyhUCPZ9aPvF+E0BTe2MrNx8ZVWW/MbGhjAIhAOpb7FK9OLIhezNBaQUCRdkRyALMIDJQysjvBN2+ZCCY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.4b03bd5e.tgz_1505830911981_0.9989283122122288","host":"s3://npm-registry-packages"}},"1.3.0-alpha.46b2ed5b":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0-alpha.46b2ed5b","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0-alpha.46b2ed5b","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"ff074a3392bd0403d3c238df0695fb539b35b7f4","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0-alpha.46b2ed5b.tgz","integrity":"sha512-yqFe0TfcwxeNkbNviuN0eXZoxesWlYE+xw1U1bwMJRHLS2S70o7F93yNzOa8aLKpqkoX0WO4KjGWW0njzKO7Rg==","signatures":[{"sig":"MEQCIGwxalqQeKiDYhY7ECILpeuszwgL+GIM6/eJ9WPiYH9YAiA3COSFmd7sTEG80DhSQf7tsCpBnLhdd1XLY2lgzQO+Jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0-alpha.46b2ed5b.tgz_1505918243226_0.14410285209305584","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.0","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"d5ac7191c4737aa5eb67615893f5597cd016c366","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.0.tgz","integrity":"sha512-ypTW6vEAZklFK8tGsKkhHe+2fcI/qdZSVgEamvSQc5CTlF7UK0Q23nLWlOWGehj52DYmFkoddZxVTJP6HhfXLA==","signatures":[{"sig":"MEUCIFK23WcDhWZEFYFWsaAs1tGdRwidIxetPy/lXWJEdOL5AiEA3ni2PpyJlbhegeyW1MOwLuwdWeJl8cwXueEgHW0MjDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.0.tgz_1507047293162_0.10685209627263248","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.1","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"fc013f07bebeb39642f0bab029b346b5296070bd","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.1.tgz","integrity":"sha512-f0ML5JJg4A49K3HsiDWHuDZYM6DMhmyPDsJ9aWa6YauwlsMGtMAcdmOuI60RakvKkbyPYEEJW85/PfaGbJrSPA==","signatures":[{"sig":"MEUCIQDlF+vAfKO2yrihcdl799uTuOnxHbIwsRWQ7yoAaoN8dgIgaCulUMsniIosFXKVhzvuM+diLbDjbKDxd+vOyGfTfLk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"5.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.4.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.1.tgz_1509377463050_0.9367260241415352","host":"s3://npm-registry-packages"}},"1.4.0-alpha.a38e504c":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.a38e504c","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.a38e504c","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"41a374084df8c4fa049c702e25518e35653b0b0c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.a38e504c.tgz","integrity":"sha512-8h0iv/Xw9uScbUn7MjiiZ2avvT+tgf6n2cJQaa95WNgFPd18kx3ImIKgXCsDbhpP2rhVCGg/0ASQeWbJ6F1Nlw==","signatures":[{"sig":"MEQCIFmjy1zuzy17/hQ+Ap2Gc6vmO+x39TGO4Ufea4xufLCnAiBY1oZFXZ7zUqJig3GInURWpVT6o6KJl6a1jL6mKijQRQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.a38e504c.tgz_1510851217432_0.05553125869482756","host":"s3://npm-registry-packages"}},"1.4.0-alpha.f190ed1a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.f190ed1a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.f190ed1a","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"563963fe2dbe549f2b5487b88693a455bcaec26e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.f190ed1a.tgz","integrity":"sha512-XyiaUs6l2mwAdiKX3oD5FP3IxO+xpusmV/T4wCiPeDrpsrW7CsO2EXhzIP3kF/eOGe4uVKBTUa4dS6Dz6bXjaQ==","signatures":[{"sig":"MEUCIQDshjxbG1wefym+3Q4Ry7Lfg+j/faOMB9XiOImIVmmciQIgFZJEuhbHnn3nUxeB1KNEHugnt/ETS3b8FvmRcm+2+Pc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.f190ed1a.tgz_1510915768113_0.9668409076984972","host":"s3://npm-registry-packages"}},"1.4.0-alpha.33fe0741":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.33fe0741","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.33fe0741","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"883490b0ae79aa348f36ea805e2886c22268be38","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.33fe0741.tgz","integrity":"sha512-jTWwq4k/p7d1yzhyc+YonT0U72Cp4gDl1BIqWaHZI+EV/H4wELqOT55P4yMJ14CgLe6IRkKJqx2jvn/ocjYt3Q==","signatures":[{"sig":"MEUCIAT2Colh2EGlrCkYmqQbZYR4vdWPgcRbVEVZY/AYfsB/AiEAiUaUh193j1dqgXTqQsW69b/IRtlKWdjXLccx/NiY8lE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.33fe0741.tgz_1510941274378_0.7072743750177324","host":"s3://npm-registry-packages"}},"1.3.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.2","maintainers":[{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"002bf4f0c63ea0a5823e0bbe7295d3c62472cc0f","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.2.tgz","integrity":"sha512-VUlJklLltTSWJkgCF6LupcfyBCEj5wZ7BTCNqawXhEHU7VxCiZ/bLOZEda9aETqLSKMUKIx9agS5XifLGwTNSQ==","signatures":[{"sig":"MEYCIQD+1K58ohZ14664QR2blsDThe4pEoBzf6S6khkPw9U/7QIhAPhRB7t4injLRjIRRpnua7fwiD/Zd9FftoWh79V0Orun","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.2.tgz_1511262094756_0.4319681168999523","host":"s3://npm-registry-packages"}},"1.3.3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"b56925ee26b41b8ddb5461c0c2d593e5e6a2dcf7","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.3.tgz","integrity":"sha512-H3vrjJDDGnZ4INCtJRKYPh/TsZ/8BKeOimei4P5FgrLv/pYM69+7IajUWW3Khw0gw7QrN8nemmquH4sVsHNVPw==","signatures":[{"sig":"MEUCICWaI5Z0V/wj5e/QPNfrRE+C0GeKYhI4LpIkCOccg6LIAiEAyFDXXcernEVSOI6Znb5Teh4Wfk1KvPf2v+K/0qLS4YM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"5.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.4.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.3.tgz_1512560138357_0.38735077739693224","host":"s3://npm-registry-packages"}},"1.3.4":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.4","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.4","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"0ed047ce1bf0f6f2303068098d3a3aaa364ea7aa","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.4.tgz","integrity":"sha512-DKr9hE6ZSthDWGNb84PIHVgta+D9D+K3r0n3KWY5FSiHXoOG9eW2arvtV5QZScum3/vLhb3F/u9qpmRZlzPXbg==","signatures":[{"sig":"MEUCIA0lmADy7oVp607qHu9IsZFEDEpaO5J7CgK0rEoRSfISAiEAl11QevEOXVEzR/cp0sbs7jS7J77rZXxiyNjwnlX65nk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"5.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"7.4.0","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.4.tgz_1512572601281_0.6385971466079354","host":"s3://npm-registry-packages"}},"1.3.5":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.5","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.5","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"b7f40779467915b94cd520e08f1e400b9db86caa","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.5.tgz","integrity":"sha512-DplpYJ6zHt/ZWWKJ0lAg6jJg3LIuht0e436yyRNIUE0IwmxPG8rcqLeI6CIS4JkIWwdaQ+VXBFx+nI6ZSYGGOQ==","signatures":[{"sig":"MEUCIQDvXJZ9waJYjsT0MD2lGgK5vG+RvirXMGZEm3+K6+gcSAIgQ1aMNc7JZ8qrIceFFE9vGjX5pHo8l9MMumkXMvRwfc4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","jshint":"jshint js"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"jshint":"^2.9.4","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.5.tgz_1512642760401_0.5480680866166949","host":"s3://npm-registry-packages"}},"1.3.7":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.7","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.7","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"115b08d3934ec28a83d3686e6b174c7853c1be52","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.7.tgz","integrity":"sha512-FYpisk/pWH4rB19Vlmw2fNYOjqkiO4pSv1zndv9xVOFxQ0MuAtVukz3x4+DoyiGqjykEud9zHQqCvAeYJCJvZg==","signatures":[{"sig":"MEQCICV9NytU82aAfrxD5836glb4s0tF2pnf9pyL6wiT+V04AiBF0qHxH9DecMlCdMe/Ib79Wpwd+riN7f/LJlEBTJFThA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"cdmgcm","email":"cdmgcm@gmail.com"},"_npmVersion":"5.0.3","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.4","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.7.tgz_1515065777032_0.9530799763742834","host":"s3://npm-registry-packages"}},"1.3.8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"13a3fb5af8105df6725ad28e8fe923855701216b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.8.tgz","integrity":"sha512-2W0EZZCI5ipAvEn8DZh2GGVcVgvcJWtNrmoPXyUrNNRhwwWanm1BvDtFXLmzUEgjW1S6E5ysMMk7QZtdOP6iBw==","signatures":[{"sig":"MEUCIFhy3oGYJlZ1IuXVWFiAR17iFwUBi1swed6VL4F5lfB2AiEAps8AyTQ4+XlpyApKnwhEf2MhhESTwElCPby0hnlv/ms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"cdmgcm","email":"cdmgcm@gmail.com"},"_npmVersion":"5.0.3","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.4","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.8.tgz_1515066658948_0.8212592836935073","host":"s3://npm-registry-packages"}},"1.4.0-alpha.cbc854c6":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.cbc854c6","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.cbc854c6","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"bd8b3ba2f85f8a49076cd7edc8d6efe993589be9","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.cbc854c6.tgz","integrity":"sha512-zJnP0lC/B+ZIdpLwVDjli9nVNKyIOifXCppm83C2nHvMGssAMz8lwb+29jS9+2pPVQkDBX83F5uC+3yKbL64pw==","signatures":[{"sig":"MEQCICocPyKjVVibXa8EFAbQI+zWCdE2KcoofEQRVV6+MYTWAiB+rcV6DFQGsjNZ6Bc56a/msfJhZ2oOupRzucmG9dIV2Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.cbc854c6.tgz_1515149946570_0.948099858360365","host":"s3://npm-registry-packages"}},"1.4.0-alpha.d74c9028":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.d74c9028","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.d74c9028","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"a8dad4af421f4991aafd62487130ee10fafec670","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.d74c9028.tgz","integrity":"sha512-pjPwd+HljWarq88vPFSz+PoexrBYeY/f3bsTpzAPXihTcUBZEXe0mWDUnbbetext91UgRdD8BExGG+j0uWwYYQ==","signatures":[{"sig":"MEQCIHw9IE4cQRigUXAeJS+Qz+X+DnmF34Wft57vKP/PW8sRAiBG38N1x2PMV5JLUx1B1IIGEqpXVyzqpWFhLj2pZ2l3QQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.d74c9028.tgz_1515150256791_0.7499646442010999","host":"s3://npm-registry-packages"}},"1.3.11":{"name":"@cnbritain/merlin-www-js-utils","version":"1.3.11","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.3.11","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"e77953096bd1e0ac31f2cdbb17ea208487d94669","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.3.11.tgz","integrity":"sha512-V2SOTO5/s3bKb2WPf7eQ0dDUNpseqFi0sU4K0j1b0u7tlVNcPvBmyjLPqVK2Wt3ND93/ffHRuy5irHfBXegBCw==","signatures":[{"sig":"MEYCIQCuVcsxBeMtdx4+lwsmXOXm2X/BmVOEplzlXNlg5D+N7wIhAJEAC7ttK0wrx00TbV76CRFPqmrwh8Mti2qKN9jS6wse","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.3.11.tgz_1515499860460_0.023030499927699566","host":"s3://npm-registry-packages"}},"1.4.0-alpha.0d7c269e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.0d7c269e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.0d7c269e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"40c6848d1f83c9d1d04ce119e56540c6fb114a69","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.0d7c269e.tgz","integrity":"sha512-q5YaqZANejuvo85zDbHqxPdbX/upzQ5/6A1prFtADxPRTW74ngxMRMpYj9hDtB92rsqw73kUfwLbWXjB2IeALg==","signatures":[{"sig":"MEQCIH6HMbRZbd6lsTcqUK9BClwPxIL+p+2lSRlM01IX//0wAiA5thpyZKoyAlALFTTBgwFzwAtnJVoZRYs6NgddSKpv8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.0d7c269e.tgz_1516634099570_0.6851382327731699","host":"s3://npm-registry-packages"}},"1.4.0-alpha.fbddcc93":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.fbddcc93","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.fbddcc93","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"c41bc1a3146dec490314ad3a151e8449d9cb555e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.fbddcc93.tgz","integrity":"sha512-574geonGN92+Hd4Av1QFVoBeXFu9kXT/g+vyKAD9AJP6psaT6/fwn+z6G/V4+80bUn6WeZwCcIPmFSDrTmD1Tw==","signatures":[{"sig":"MEUCIAWWcT5BlQl7pNNdBf43M3VpIzTtzsQx5ySwRT0EqfWeAiEA7Phw5mgx+Gp2C/GTGpIIWVpgPWSxjcnPhs15UZ1UHpM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.fbddcc93.tgz_1517479887791_0.6079292658250779","host":"s3://npm-registry-packages"}},"1.4.0-alpha.5464422f":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.5464422f","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.5464422f","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"}],"dist":{"shasum":"4ec61a3c4a7fcd78bd041c89fd1f62242f8776e4","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.5464422f.tgz","integrity":"sha512-M+6W29jsk7awPTzqZj+rE/biK4PtYOgHnzFMTCw+VMAE0ZixS8+frXYiTKJ1GmLpgPssbPob5YbQJmVSj//LBQ==","signatures":[{"sig":"MEUCICO63K3B6++wPfuj67BRd/JR2PArOU7/UzOWcIGVumIzAiEAj2/6EOVooL5eDGUQ06rru7Nx66HAvi8hFI94ZIrYMEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils-1.4.0-alpha.5464422f.tgz_1517481461686_0.1542652549687773","host":"s3://npm-registry-packages"}},"1.4.0-alpha.d353df7f":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0-alpha.d353df7f","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0-alpha.d353df7f","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b026c5735b0961a51e290290f111e5b58fe2bb7a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0-alpha.d353df7f.tgz","fileCount":8,"integrity":"sha512-Rgg9jvOhmFo7fu9lnAKS/vmi2PQsnXh/qLrWnqaZLINBJUER/cA3ROVd0yugmDzo9fzW/FCGYE00vUQDKV1kUw==","signatures":[{"sig":"MEUCIQDGv/p8a8OG/Xpily3HQc3RkQyZjW8b2f5jDbXqOQozTAIgZeI8/y9LvQeTB3dfS7uVcFkRqhMVewcACAIqJRQxHOA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63559},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.6.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.4.0-alpha.d353df7f_1518630195289_0.8027451621816715","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b33f639b0831f6cfe46eaf6039f1ff5249510760","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.0.tgz","fileCount":9,"integrity":"sha512-XSXUW9i/J4vv67Z23ob/sgl0PBfimnj85jP0+XZZxo9X/qeEQ+BeTJ1ADqdvQdjVwYYawaTZHKZh9e4c8s6EbA==","signatures":[{"sig":"MEUCIC2jqAHpOPD3NA5NbDs7KKfLtbIv1gJST+4uvDPm7eJnAiEA1f06xk5TKNUz99VWE4OPEtJB5SezEqe1172lD/4WLhQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64491},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.7.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.4.0_1519901838324_0.4047713625743965","host":"s3://npm-registry-packages"}},"1.4.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"f21822643b284ef320279e0252170b56407b2883","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.1.tgz","fileCount":9,"integrity":"sha512-NZsF1YU9AndPTQd+n6ZKDKFv1yISH4jp00pTJyNlyFzVdTrooXgJaMu5teAnjgrMYpgcPNFK6mNUYMpCHOixsw==","signatures":[{"sig":"MEQCIE8lnzva5fbojvBdTKXMgGfMguwz8Igqf/LYtYDluiMkAiBOhTbFpJzHGoeU3F26kv3FjYRhnKFdOLN5J+DOuAVJMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64782},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.4.1_1520593260495_0.8287121906861254","host":"s3://npm-registry-packages"}},"1.4.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.4.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.4.2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"a821023ea204fab4a8275ca153485b480b896116","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.4.2.tgz","fileCount":9,"integrity":"sha512-mxywX1mJiBKTPErf2gkJePSi8xQ6q0u5PkwP2FlubG4QfStXvTWHLJWUpzYugSy4/hfNgi4no0Wk6c/kxpoYxQ==","signatures":[{"sig":"MEUCIQCIZH5fGuFHqP+Bv40wJFv4pCQS0F4hS63MoDkaZZE+JAIgI1xPrmzJC51hfzMHmwHnIJUTOgmZROvqxWROXVAKayo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64782},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"cdmgcm","email":"cdmgcm@gmail.com"},"_npmVersion":"5.7.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.4","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.4.2_1520945558664_0.7680193841610572","host":"s3://npm-registry-packages"}},"1.5.0-alpha.b735974c":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.0-alpha.b735974c","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.0-alpha.b735974c","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"707db3270693f1e21fd633e19eeb375c31c96a1a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.0-alpha.b735974c.tgz","fileCount":9,"integrity":"sha512-OFznfeVEVtH73u0U8Rzg6/SYflVDZ1+2SgOY6VlbzGam2yqa3J+9cZ2mdJR+hhMnxcLAdKynaQLK46kbKQGpSg==","signatures":[{"sig":"MEYCIQDZ+DbyzLYiOx0y3oKLGdYgwi70KvqxJ/IdfcPCu/P6dAIhAJm8AhsydlY0jbY0HNhAgDycYfpxybipM5ibe3VxxOzf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64797},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.0-alpha.b735974c_1521459762121_0.6205663552286134","host":"s3://npm-registry-packages"}},"1.5.0-alpha.c6bfabf0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.0-alpha.c6bfabf0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.0-alpha.c6bfabf0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"30eca3bc7cc06bf68a1379cb78330f88cc709a85","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.0-alpha.c6bfabf0.tgz","fileCount":9,"integrity":"sha512-UH/90jFqrZNY6s+rjmQA+dEAh1Ge/6oCpTuIhu9H5pxzg7qtOLn2Y9UFBLSBQWatQt9qsW8jECzAC9H39GHwIA==","signatures":[{"sig":"MEUCIHQ68Y2653V6dHYl/XYdIk+iQNrp3NNQGjtziscRK2qbAiEApG8D8v7fPBOhWm5LaBx51UbRrnnTdWoC97LamQqUN0o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64797},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.0-alpha.c6bfabf0_1521460438219_0.6020568965378466","host":"s3://npm-registry-packages"}},"1.5.0-alpha.de72f877":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.0-alpha.de72f877","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.0-alpha.de72f877","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"5c175635bcddb297bf4feb804a323e4043916e4c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.0-alpha.de72f877.tgz","fileCount":9,"integrity":"sha512-UYnkDQNsXh4NX5MxxecWVlcVCojmnDD80umy9IzUoJzHvqj67nHsG7p7alN7JgOtNTxNYStTLRu2gnjVeXxTmg==","signatures":[{"sig":"MEQCIFHEyKoOdNHgBxRpW/aExUBCCJ/2jYTX5hXQmerQOONFAiB+putdZjK35FNqPJ2af0TAJM+pZTS+UABqwsoxDBHUJw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":64797},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.0-alpha.de72f877_1521462679182_0.693050583567332","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"1af3c022921e5885709409b48559203638746abf","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.0.tgz","fileCount":9,"integrity":"sha512-4Xk9m/PHZZu77JvU+v2G7MA6lsii3vGbrYgXYXIZM0WEDExmBZkAj8ROYQSL1rk3v7oMunRK34T55iLHJ4WaJw==","signatures":[{"sig":"MEQCIAMoDTQppewF1Yb/MjSUmhMn+HMXxOoQguZI9wTxumn7AiBJS6oaSdJq8V4I6ibfkkYeRosNjfEbLK9kWq3mr7HIfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65553},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.0_1521464992631_0.7904973832494482","host":"s3://npm-registry-packages"}},"1.5.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"f730dac9f6b822b02733060531154e94ae443202","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.2.tgz","fileCount":9,"integrity":"sha512-HjCk0VmYiYjFNLO3fCrqKNwfRB10XeIBg8VT1yFr/WU9fGttlozzwEgE5FL8dU/UW5UdaoFyxfa148XElSKkXg==","signatures":[{"sig":"MEUCIF93IQNeo9jIg8jR3IriAUNKnZJAHtoEwf9vM0gIzbjoAiEA4gTbu2kMX3lKy1LpvnNhbdQKV8vxFOsvWSKYJFnGAI4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65553},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"5.6.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.2_1521558606651_0.7767941586492859","host":"s3://npm-registry-packages"}},"1.6.0-alpha.70f4e307":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.70f4e307","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.70f4e307","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"f7455e62e01791278251b9090d0b98114a5347c4","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.70f4e307.tgz","fileCount":9,"integrity":"sha512-+EmCIRntybC/Aw6/fsTBHozZPn2MFPzZdQgd38cZxnCRy+5lGTn8vwWdYoMywcKqkajC1je5nsabMaZHVw9Yhg==","signatures":[{"sig":"MEUCIQD1XL00lqJbRjuzckTH04abq6fJP+rzNeXshlAAu5TLmgIgd6BrN2Ixc5spWoBMVazmaYdUwWsk6oynl7aFn3jD1MQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.7.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.70f4e307_1521727754192_0.8224380567507119","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b8d0fb546799ba4f0ea8e1c54780a961de7dde66","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0.tgz","fileCount":9,"integrity":"sha512-JiegLvmAVf5W8gvAeW6xjxn8lDy9nLIvdwU0IgqXDHcwq6IWut6HZYYbYeSxhPXFDHbVvORMyKOy4nKLabFYmA==","signatures":[{"sig":"MEUCIFVQ3iABwVBti9GlU3UlZn+wfk8bxy7gssYDu/669EsTAiEA0xTwtPztR1s1EL8ao2J/wt8z092m77HsJ5KovvbdMNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65553},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0_1521820906973_0.6176416617579257","host":"s3://npm-registry-packages"}},"1.6.0-alpha.e9030b87":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.e9030b87","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.e9030b87","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"594d2a8343a784e928100cf44982c57922a0df60","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.e9030b87.tgz","fileCount":9,"integrity":"sha512-kc4SS0f4VEjK4mKD2tLsfhhp0GDss3/SEZKeiv5sLgiawQv5pnKnldY/dalCKPxxzzI4RZ++p5369KfK9Ho1zA==","signatures":[{"sig":"MEUCIEIOaiwu/Aa//r3aryiGrOoHrqxRpRRTuVnLTJMutlJ7AiEAvmkTjXkUeu0+NUCA+lMYB4yN6Ax94RrdZl4X/2VOH+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.e9030b87_1522163047951_0.8523544568986148","host":"s3://npm-registry-packages"}},"1.6.0-alpha.de38a0a8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.de38a0a8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.de38a0a8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"e50cb6bcc51df57c078d715988db14c57756c254","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.de38a0a8.tgz","fileCount":9,"integrity":"sha512-deU3oYiVk4saH94rW2mKRmesYK2IAQh+eZwFlsZYeikZYYnUZjEwJ9VNNTKUlFXEPheb/rYAWj1/p5dNHMG9NA==","signatures":[{"sig":"MEYCIQChfc+w9btR9nTXwwOCtzYZxucCEE7BDKWdXkFGlYXL3AIhAKvuSoz35aGLl2gsJLoYI3PGjyv92BFTXxx3Gsi5jZ1x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.de38a0a8_1522166803063_0.5527554086691857","host":"s3://npm-registry-packages"}},"1.5.2-alpha.de38a0a8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.5.2-alpha.de38a0a8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.5.2-alpha.de38a0a8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"fa3308aca5cd6c5fe6a902e8c1e6140c57508ee0","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.5.2-alpha.de38a0a8.tgz","fileCount":9,"integrity":"sha512-wjEJuXDAFBl78GG9/dHJUwzCBWzCWF7KcVctrzmIyA6jSsshaXmYsth24N+BHosZn30XX4coCGaRppqiT0FOeg==","signatures":[{"sig":"MEUCIBPXIDvtrYRhSVccuIdy9CxQZxE9f50Ymk0VzRQxvIHwAiEAinKP4Fcv9WkWjL3qdF/zeOQExHLoTaGhBf/jzZyz1Xw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"5.6.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.5.2-alpha.de38a0a8_1522167833911_0.5325538528722982","host":"s3://npm-registry-packages"}},"1.6.0-beta.de38a0a8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-beta.de38a0a8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-beta.de38a0a8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ba55dae0820d90a4b3ed2c7655eebf8456739bc3","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-beta.de38a0a8.tgz","fileCount":9,"integrity":"sha512-oa4kstuTUNTCb30LkSLCODtb61/H5ILri4mjTIUH1x5VlbyBfKSgeYI9y2vSd5ELyUUBPoEbPu9TcCCh1BsYAw==","signatures":[{"sig":"MEUCIF12sexw6wWJKv7L6qUuXPRhSKmkw+PQFDuqcbBWHqr9AiEA6KYHy0DrvvqN0+LVIS2yyUgmyUB6E6AHkxvPLJXxomc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65567},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.5.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-beta.de38a0a8_1522168171579_0.3649730329779741","host":"s3://npm-registry-packages"}},"1.6.0-dev.de38a0a8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-dev.de38a0a8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-dev.de38a0a8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"bfb038c773bc6894b172f43b0ae69a2f13599d6a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-dev.de38a0a8.tgz","fileCount":9,"integrity":"sha512-+Gk8aXxjn5MJBCxntz9rCwjJU5oLiRnT+Iefdf4tzUpAKrsMqS2bdHRhDfbzVyM/uiaS7WAfd3MuEcrVaDrEiA==","signatures":[{"sig":"MEUCIFnnnYsNxyXPktY8HnU5rlwsfqTc7nrA+Q+k6R4udFYlAiEAmtNpmIBZ3Do8m2UlfOaOCBYu/wg7vjJYPKiUgwkNs1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65566},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-dev.de38a0a8_1522170607295_0.813575085125231","host":"s3://npm-registry-packages"}},"1.6.0-alpha.fcecef2e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.fcecef2e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.fcecef2e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"3460f0942302bfbee50323444f2d92db6ce481cf","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.fcecef2e.tgz","fileCount":9,"integrity":"sha512-JMqQsB/FtAm8sEfViDUZast2gyrkyWrOi2m5T9lNCsalvJjLvYQW20EV4WlPCiirWUmScFNMgrpzJ712WuS7ow==","signatures":[{"sig":"MEYCIQCxyOtB/T5k9t9GQPMp2HC+pCFgaS46ew9aO4iR46rARAIhAN23/+D655RqDfhvJu6507BeNPy1jzHdzjcWPcQXqAOD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.fcecef2e_1522228374944_0.03983044340153974","host":"s3://npm-registry-packages"}},"1.6.0-alpha.8458de26":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.8458de26","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.8458de26","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"e2eec02a24f1af6bde6e858c689c3f4c14b16982","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.8458de26.tgz","fileCount":9,"integrity":"sha512-A0KwpKS9v7cEKrEeAbJmNcd+j3j4MiSz3IcS/na7nS4KaA+4Bt3jPknL/f/fCz/W7fXtu7ECYE2Tfjw0wTAB5A==","signatures":[{"sig":"MEUCIG3U5cWuUdfeuUYVK829M5CXZ7c2CqCIleKhpU54h0UCAiEAlBX3DKDmF9CguYTJS9UweEzn/l11YikR9vAoogkxSRg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.8458de26_1522241963001_0.37786787302599234","host":"s3://npm-registry-packages"}},"1.6.0-alpha.a0fd1321":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.a0fd1321","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.a0fd1321","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"6de77dd5e1c1ae0dde97c9611d8c714265ea6e39","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.a0fd1321.tgz","fileCount":9,"integrity":"sha512-qLRhbBFfHTSWWtJFRN3eF/t7j0/NDkK/ZtOrmMSIRu54H0zEU1UrVKcAERNXyodsZAF7XqG0Pl7Ljj0eS1fhyQ==","signatures":[{"sig":"MEYCIQCdHYuKWtIKYfvelA+p5hqwAE0yVjDO4wP76jcSjkOqtQIhAOS9i3sHMJTm+lX4Pe3U6mB66lJOIVdSlwp6ITWV3kW8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.a0fd1321_1522248183387_0.13736987499043307","host":"s3://npm-registry-packages"}},"1.6.0-alpha.18520bf8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-alpha.18520bf8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-alpha.18520bf8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"3197d79b420e31dfb25ca54c8350ba75b4fce5e9","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-alpha.18520bf8.tgz","fileCount":9,"integrity":"sha512-zSd30r4ZZXK0s1CdjMpolAfqITGgFtfEwiDW8VAazEPWC8HlkQffvt6z8r/+iyekM6GLHS6+wjLbme8jh4Ql6Q==","signatures":[{"sig":"MEUCIQClWSOHfHqB/8E20AQOFoezdOVLWUXkndtMfgE2X+kSmQIgd2r7jXQS9n2N218oaEzAMsPvrjN8fMYna1T0BI2KKLc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-alpha.18520bf8_1522249592318_0.7477935598508423","host":"s3://npm-registry-packages"}},"1.6.0-dev.18520bf8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.0-dev.18520bf8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.0-dev.18520bf8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"86b580aa8519e3e110e62021fa39056e657ba13d","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.0-dev.18520bf8.tgz","fileCount":9,"integrity":"sha512-I+dZf4xOLtFmwDbMO950+Fgurqdl2YsJyqcqB9zkuF7Pl3t3R96k9GK1DXPmzkdZywJcEtrUhKr3bJzN2O8J7Q==","signatures":[{"sig":"MEUCIQCDeaAPn3QF6FmzEBJup1xS+XS3qlj2mg73TOFLd92gWwIgP5sLEER5I08r/RcbCl4l4/YNNZdacAvOSrq+iCWxqvY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65566},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.7.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.0-dev.18520bf8_1522251296406_0.2855144842370161","host":"s3://npm-registry-packages"}},"1.7.0-alpha.b29f7426":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.b29f7426","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.b29f7426","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"28b9115aa34290cdac78dbf3a3cafa4697eaae10","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.b29f7426.tgz","fileCount":9,"integrity":"sha512-otiU1oPnTF+FmVxr8rl1uAAwiAwyprK9zugg1MeqqPHFUDOELNC1yy5UQ7I9UYllFNGOKIsPCjpZZxsm5vXJSg==","signatures":[{"sig":"MEUCIGMgnVPHFEpZ1KbjXKQZPDT5cKrcON1F6JVGYep7oEZ3AiEA4anJ6a5G9zjC7vG1+4nrKl1Ym02QSbNK6dlcAW2skjE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.b29f7426_1522324457790_0.945010830093931","host":"s3://npm-registry-packages"}},"1.7.0-alpha.2ff0230b":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.2ff0230b","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.2ff0230b","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"383598f14cf1414152dc1f271b6c2e32da156b4c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.2ff0230b.tgz","fileCount":9,"integrity":"sha512-bM6JXeyk4DBGApjsEkNIgopX8VRa78S07uqZjXAlRtHfhgvbH6VJolrvWnrNkjGH/Brz+HsSjpuEsWFiOvskLg==","signatures":[{"sig":"MEUCIDcOmuXCfmMDR6kCRlSRUvmxg93lrz6X/S+aVnxrtG+5AiEA2pJjTwJ49pmnApSoj2+7hYx9NmtA5eMxR6JTySJ+mKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.2ff0230b_1522752789850_0.8583228255582269","host":"s3://npm-registry-packages"}},"1.7.0-alpha.3719e99a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.3719e99a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.3719e99a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"6ad6e4c534d1589135920445590b07a749eb2eff","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.3719e99a.tgz","fileCount":9,"integrity":"sha512-g3bRnO3hCkEWKs5lgnhTEF8H53qwnsYM7DhsHSxcxydgTsYp4ccsPvKGPnIlob5VZ/qIJZEKaSOgR1mz6Eg3OQ==","signatures":[{"sig":"MEQCIHHCDTs29ZxZscr/w3+jdntEfgcZO93/hS2klIUIbEZKAiBq1obzJ/i/9XW1rfPbXnsUMNZSnYFvDXH4UrdzT+hNiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.3719e99a_1522753960152_0.05426504863513415","host":"s3://npm-registry-packages"}},"1.7.0-alpha.0bd04e31":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.0bd04e31","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.0bd04e31","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"74c696b00634c36ed5818c7ea348af331b1b5222","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.0bd04e31.tgz","fileCount":9,"integrity":"sha512-s2ide7SEhcrwvWCGJMXSfF/QbixGqPHE6VgQTooVA2sT3SJ8kQ3pAXdN2olBxUInVTpE67JOY/4lXjGNtiWb1Q==","signatures":[{"sig":"MEQCIG33ixoiX5vBU3xY2U4CpC5e0STrz4wHGC/GVA0f6xOHAiAocUmi0MxigTGnkex/7TscCTOtf2KTavPZ9+86TxwBrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.0bd04e31_1522754995918_0.2037736629289224","host":"s3://npm-registry-packages"}},"1.7.0-alpha.a8f71bef":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.a8f71bef","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.a8f71bef","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"eecb938afecbbf4166fc5a7c0369a3509356d7ea","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.a8f71bef.tgz","fileCount":9,"integrity":"sha512-PV70TBC3J5da0uoqJDu5yXUjp3XfV3gV96CRPs+5lrgRrJMw5uRPy3ZpsFrhLfTyA4qfhR4PSjuFMCXlteY7mg==","signatures":[{"sig":"MEUCIQCuQVaPHejEJtM5pwb31TTjP59DdictrzhwjlZkNzMSJwIgJGPHX0zM5Kmk5DfKvoyuHl8mk8OueXXExOgPPA4C108=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.a8f71bef_1522758846965_0.588487656523047","host":"s3://npm-registry-packages"}},"1.7.0-alpha.b253a772":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.b253a772","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.b253a772","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"8f1d5e0b21727f917dca3b12be79e30f44eded07","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.b253a772.tgz","fileCount":9,"integrity":"sha512-AMTS8Yt3edy9pfgiTAelsJgsCRg3qtscJkrz2jQ/ngTr7sKx4DHZYn1Ps+kKrkxfL5B+lZrusgim2l9G85cj8g==","signatures":[{"sig":"MEQCICITanaB8GuONGcfUv+/ydp7FW9fx9vQ2S8W8twUt0b3AiBtEbS9cItq7vdb1HbrklV1lrLfrSw3Lvlaj4rLhTVCVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.b253a772_1522763384389_0.43253138401224","host":"s3://npm-registry-packages"}},"1.7.0-alpha.9fc11b48":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.9fc11b48","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.9fc11b48","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"444a0c9f55bb053ed044cbffb50bc1925d158339","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.9fc11b48.tgz","fileCount":9,"integrity":"sha512-ljezaD6efK7ifI2qiIYOcWttsWQzqkvBpCQzqUC9mBBAvBDos0D0XklkFi7Fx6IFnhqpXfBhyjYR/li3dYsHsw==","signatures":[{"sig":"MEYCIQDqKRkRwkBkm3qaZgAvnNvwpm4L/IGiKsmLARL/LcLF6wIhAKyxfEEmCPaCCiJJMPMkn/SwGcs7o4YKZH3v+G5Dxb46","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.9fc11b48_1522764144941_0.049176681479508044","host":"s3://npm-registry-packages"}},"1.7.0-alpha.c7cede5a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.c7cede5a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.c7cede5a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"fc9699196fc9ee495d0afbbb1c94b127329eaf24","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.c7cede5a.tgz","fileCount":9,"integrity":"sha512-FpGjtzBN1PIrHWpO61Xm+9Ftg75CYeoEIlH1UpN9WntbqUvGVQqv5TF/sixiZh923Nm998S32Xvm9VF8j4nFaw==","signatures":[{"sig":"MEUCIQDmO/Wb68VT+HBgJ307MVqiBKbfG02KkgALSiVKW2tmDwIgX/FAbyfr5wDwNiWw8MqhcKfLkQ6QYpyhV0LyzTIiFCg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65568},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.c7cede5a_1522765965507_0.967136230886563","host":"s3://npm-registry-packages"}},"1.6.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"690e2960948cc617b5ab0468e9eb849584053e5e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.1.tgz","fileCount":9,"integrity":"sha512-JVALmHhjBk8HUPKyD8N6JVPm3ltFHNRaQF/OBEAriSHjrw8h2wVfbX2Keby6H30hS2CGmZbVw0eycgkbUXjPsA==","signatures":[{"sig":"MEUCIQCCePG2Nw08bqL1Aswf3hpk9DFTbNHJfxavM9CWwiuh6AIgFIUL5nQs1QyGl3Mpa+xpE0qNmetb4Ff9yqy6/L4iGYM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65806},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"5.8.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.1_1523023521399_0.5425886685624186","host":"s3://npm-registry-packages"}},"1.7.0-alpha.90c2a973":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.90c2a973","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.90c2a973","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7d52dde02e08a5a93eb4df60c76afd3c3b853a9a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.90c2a973.tgz","fileCount":9,"integrity":"sha512-kOso5t8eGrcfwrPgD+PnxjGZgWkQsFgSg0gBmThkqoh2AFkSyfrH56goSSFZnu/BQ1kfGs33nT2LqMvzcglbvA==","signatures":[{"sig":"MEUCIDb3UNHrwxi90MF3n+ZAmIxEwouM30aVoGIqvLJInOk3AiEAijgACZvs/WFP4Be39992FlRUy9v7HjvjNuweuEr5xNM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCCQDCRA9TVsSAnZWagAAwVQP/RIFR6sh9XR9T15WlP9Q\niMETIbN2u4Z+NUZsUYJsNPm/5nFZNS5T+12+xuFWUKmRnylJRPAiR4bPq0tS\npJJB/CcPD+S23R9/cdinLHMfzmt/MI0mY3BcBJV6NdTSL+kpwa+EoYZjS5CW\n3wYUJtpD+VES1jag1761ZNcdBOjE67vBd4M8UEz9HpZIkD3sWHWn8cvHI7WR\ns8MMP1ygPpHL79k6snaIpjV+gE2i0zIH8mV7rzVoUIbDV7YG3FWg6FM47NIC\niCxPWyUGqEgXG2ZI/OrNUElrMaEGiqnM9LoPn0ZTggCOiO3t+jCx8uwO805f\nE8LSAHdhB8wJaL+nOrgOl8w+iCWhXNjHro+f2BJ0HbWKN7Le26ijq+SJgIkI\nEMBwRZ+gW7NutQTKBIXO6sjeu/1L03nsyZOZvaLyvbYaYXnVVqDZdA9B+HnW\nPwJO46nUgClMrT7qGEOjSLId8tCkJU72/ow8NqMFZCiohk+PBxD/iIlNUJJY\nFzXdjR/xtj8ruPjdLpWBPubSZxSVadhC/miZflf5yvWfg8vGWWfKQ9pGbOLj\naxJqo+J1sC3wlPNqD1O7asv2Eg5eQ9jgdNNjBbL/cEV8qEuBsxg8CTGuqP/k\nNns3boVMi2bVaFVNke65BfnjKbPWTHLWGzyasAlxOjo7rYx/mtl74A1j/Oqb\nPTr/\r\n=rf1o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.90c2a973_1527260162838_0.4812964561273445","host":"s3://npm-registry-packages"}},"1.7.0-alpha.60c27ca3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.60c27ca3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.60c27ca3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"09e9d8c5890ecba9170ad26fb0ba36f69a3ec20b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.60c27ca3.tgz","fileCount":9,"integrity":"sha512-tkBF+9V5FrgCBtthR/17e+T3MhdIFrvLF6v/x2w0GD9XANPgDf+mt4io62w5uV30tOZw6w713mgjTo33JKbAwg==","signatures":[{"sig":"MEUCIFdqiXXqK1amOB4RxoDNC7PPqxNk4ktkj0oe6HoRQFIxAiEAxNWqVMbCtQc/aFecRnxQ6PbpBU+5x1cNVLDwbKisKzM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCC6ICRA9TVsSAnZWagAAu7cP/Ag8QG5rZNz1fKgMPyrc\nDNyIf1nb7MWvBD4RM7is9HM3pr+w9gvtQNYeMGQcZ3B5azn1iFaYrOcwru6y\n+PNxxCLEi1k5qC7msGvY+nMuEMyoRYrnsHWllGUHkzs0HLgpk3hHnSWcm6c5\nCGR6ouLcKLI4ZonOtyLJ1Na16kQFAT47zINAieOS9WDsUox4OfpiHiKJvSpa\nawxKoigpRgw3m+F+bvEn/xIde0kfOu3GCn5Do/J658zdDmKZwFfC4p5LFeDl\niUtCetp6coy72G+KGnCVcXrwcKrxtPg86h3nfrrOtmiGKTh/BiUo8a2Myu/g\nrGEh8qFQRgj2eDA2DgFgrHvESGcAp8bEfx4auPMjGdLKKh/uT8/w8HxcU1Q5\nImpoNuY/17DV334QCQD//4wyLjG48flIBx14wDQYUP0Dau7joSsZRyHwvOEk\nKsq+qlaCmtaVigiAGh/5JuOlsTTlc+l76hCIC1uems8HId4iYuy9UMZfuOH3\nAolENPtOjodjBeTLqN4beACbp4Q58pPGVPwXM2wmjEPKaUZdnTUQ6zIqUnFs\nog3b9BD/16w70i71lJPGCwU9XJUMgAcQ9hWkF8A6Whu0A4jMk1OpdJsbMXE6\nwq4dussEwgUl9g7RFKnowKPBVsnP0UQgVpppVuVVeAru8GZ/dPWOJaeainer\nQQEH\r\n=JQBi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.60c27ca3_1527262854064_0.3638164565320021","host":"s3://npm-registry-packages"}},"1.7.0-alpha.2b31d299":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.2b31d299","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.2b31d299","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"bdcda7bc59bda1b0f03322bc58246dd55fcb2e89","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.2b31d299.tgz","fileCount":9,"integrity":"sha512-WHbBRYAeL0ravV41qVE0gKzaKkfh6EcPiEdQFug4aR/Bjwmn5C3G1AqaPMVWJb8wp0x+UrnBzGdRb9mxvzdm5A==","signatures":[{"sig":"MEQCIBUGehxWnTh2g0UuWUt4ZM/QWDq3p4g7sBhqVlq21OiGAiBpNStwG8OoDmAVOZKHEZlvgrtsTk1YrAN224xSm5glHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCDPvCRA9TVsSAnZWagAADegP/1cwXD0LvyVR48r4iO6+\nAmJaqmONzLw10cB3rG55oVBoe3GjLw7I/xJgHpgORNV7JV7jimbp2LeBDiuD\nqfovT+mIGe/7gfK+OoVzF9nBb6L2D3mZT3by0F+u3S+eyPnu48+3Tac6RvuM\nVMQZWzr4lVa+KKUDQc5Zf2rUbaOUpy/+nx4lnQjl7ng1fcbpmoXD5YCy9SYU\nx49YLs+zlVdqI9vmIzqwVHYxgU0jhSqXtf4r/iPsM9OKqGzW5e0Cx6E1pH5v\n0ghoSnThsEHjug/rK616nLDIPtaVEjYvzam+Fk5He31nNgfzNqYbomB+DLOF\nXa2JiBu5wNCVZAhXXf4oywQ4p45PnPF+S8xftR84xBiNCzdDVPr+VxMfuNQT\nBJv9LwT0ys45Ve88DmG/B81aaToFwYRKgYlf+yYU4G8AA9EBnilys7++fjFD\nqXJumZ1nJlOISARUXMiVtzPqk7AVmIz1YS9amZnItRp4wPTQPLsLqKruq5Je\nUa3c2GRXefzVdbtefbFlSJ94P5UybOQwljoJdxAVeKPNbKNWn4Tp2erl1lU4\ngME0RbVQw34nXsAUjWhLEQ0qKNG/1IiEV82LEJaKSGTjIxOoS0UQZ1/Lu8kZ\n2ApUR/DY1oKuSIzISK3UAEsCDMf+6f1o+AR1y7aR96rKS38XBGgh8ks+pJAp\nqPaa\r\n=gOnv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.2b31d299_1527264238016_0.3184330590663942","host":"s3://npm-registry-packages"}},"1.7.0-alpha.f9740aff":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.f9740aff","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.f9740aff","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"29c7ee93c53a1bee836d07236e25d335f94b2e87","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.f9740aff.tgz","fileCount":9,"integrity":"sha512-/Pl9t/Znce8Mav7SFcIULxF/Mv4rdDvI5OgIyInPt3fYtcmAn/OAU0xCAZvgczWCjYsXXF4ez2EzgChLfAyNMg==","signatures":[{"sig":"MEUCIGiBOCAPFxdb0kmzedVvj2W2dgXMcGS0vTahFYeIlp8FAiEA9zIfb2YT8XLXXuLcleFKWcmswNFteid3b0pXjSKh6xQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCEEcCRA9TVsSAnZWagAA8MwP/0rxcrcK3WmMAlWaFiGU\nRB9e+PAR6/Wbju/biXoRXIO24NVasdnRs34YjzNuR/8/AQTR+hc080YJyIRF\n0gYlHZxdXUFxfu/9oErdKV37ckmPGQhObhLmxY7oH1VkAlZfYEhLp+BZXAhW\nFV3hnBh9aWd8I5m6BZiL0Eqb5skHohkuTA9me5VdoLQDirSDzeUjZiYHE/1l\nVQfmvuRbGjRGF2lcH84U1JTSlXhOgC6qtbpdtgUNKfoTom5U07lx6uTapwer\n9uPUY4VKs//wCftJ6Zfetcdmxux3abONAITIuBhy6u+jdCCppEgkBu7fOwGJ\nrF4Oaitei15XuITOcqSXYBvbbC85b7YUoJMCCXyvNl8++CtDRs8nxs1oZw8E\nV8EYJ9sHiY9Td7crk/oo9Tlnh1YbUW2WbRfJiHaYNqjB4++6mr+gPaK8Q5s8\nY6FWSxln8CRzoVc8s/jsjiid03+VizUQyxf3m4Enx3afHemfr+IaQhRjzhKn\n4nCPUVg45aiJSCpuzzwNiOqDJfHiQUn1UAg+LUn0cxTF1ACNXj3A1i9pKoLC\n9XGkack8UErOEU5K977kjb8Y6FT6oafCZZ/EL4fII8/qrDvAHOPvTlqFvG2L\nnxWoQNr+XprMm0DlKXBA5OC5HLCcDaeAC5306deibdQ/ENem0aCQmwV4ViZK\n7oTz\r\n=fVrj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.f9740aff_1527267611821_0.011815315010337946","host":"s3://npm-registry-packages"}},"1.7.0-alpha.0d92a51e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.0d92a51e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.0d92a51e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"c5161d10f766142d5cb029f09068f6cdee044e50","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.0d92a51e.tgz","fileCount":9,"integrity":"sha512-1/vl9r+VBSsRYqUNfNAxV1ZbAC1FUR1Tyyr6m6Y+NFGWafYjcqIEjzrQ9KFkP/Yf3N3t/j4RPLqGjxGg4xpazA==","signatures":[{"sig":"MEQCIEDAKCMkLKmM8QF1095cV/jNhmhOuGk7yVmQPZ0CkNcMAiAoaHIcKeBnUeJJ8vvp9q4LXBoZiwTEZAlkO/2HOfW1Ew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCEjKCRA9TVsSAnZWagAAjC0QAKC8vewb/SulbYxphSV+\nUxF3DRaK1HurjJyvzfgFTFA4BkVJEz/mRl1e4rzdyii+NZLF6bK42IasZL2w\ngxsd64VaBVWB0C0BtQJDzLzXO0HNw5dkWphEGOsNXG+wW4La5aLdjYnyR7Xt\nVW0aeuKPqMskBKpZdVjMbJY8TuLsa7/cUix65N6tTQbgsMtZyf2DdbygCnTQ\nG4WCLeyYpRXInhkrQBZnDleLPHbvuJsGVnQZ6W3kcAQF1+CsQPucfGloP9wa\n2NdtS7mohJ3enyE3ku9rfll5edI+MmEMcno7haVrbtlk1VQtHlua1rPUqZeZ\nBTSu7mi7NI7ir94g0pBJdtdVOOjvfHgxdSwzSyL1TJtNQZ4yGD3REQKm28II\na2ebmf6Sc/beO2XdU1Dvt1yqy1VX0SrJG1ZGRxhgyrOcbrZlCMPuCAxFBLJL\nce1WKVnPSVjBVLkAe2l/ZdVRUFy/5x3oqp/s8Vsjl1/Qc3p+XDKDZThjwZ9M\nnDD4wve+W2lQQZc6PrRdB8T9SF04Ou8RfxRDiC9mC4kdjOivI/50KcsOP7xV\nN5u3/7aaGjS7sNWBE7C+pa8Wvz69jX4mHkmug/BS97gOxkwcWREOnpD81X+G\nyjG/NdK+tBr6T1wseFHFWA3HRboG8AJusXO0kgffKsJEuFKNsMycPNO5FKn9\ni1Ga\r\n=GNiJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.0d92a51e_1527269577207_0.9283442701289126","host":"s3://npm-registry-packages"}},"1.7.0-alpha.c8034bf1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.c8034bf1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.c8034bf1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"e0a4e5a2632977e72fd7f38227857df46698e68c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.c8034bf1.tgz","fileCount":9,"integrity":"sha512-jqZ/I4pqJktcDaR0FaOkPjsBv3WQEmTe2hS57j6MDRyKOvsIXN4MAnYgMYmo4qWcdnhRzU81LSeUqEyRTolmbg==","signatures":[{"sig":"MEUCIBAZACP5OyuzDGn/IaybTVv+u4vK4C2444idwyiJgYdtAiEA8eAtnjTGPF6CMAA1xNQ2Hp5Oisk4ruLrZ7n0Yievinw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDSuHCRA9TVsSAnZWagAA/7UP/1AqTPMksu0cTNhYAdaj\nD6UEB+QgunUxy0Cbb7sz4tFkEINAsQjQx2j1L+QzPk8tyYSdIfUltXWe59Oh\nMfGLpcCddxSS5Ct+/0+v2mmp/gsfduJOARCW5lWjJcLymC5e6WZw6PJ103wu\nrU5NvKy66MtFcLEUt0+RsimmiLNVgP6eNuva7LCenYqYrMxgdJvQGgOPQqhx\n9CKjg2VHsNgzrcZiguYtk8FuqWV3ZShSiQmbS3cbTzxEvXj+VSf8OTZUgtc8\nfwMf7fkDk0F9yQzk5oe/jBAy1V6i0mPTZDmGGiyPMP39V8RT041+tLpskxjX\nQVLMfSNfYSNcd10HOxSr5Y4B6Rw96VKgaO6AEXT2caU0dtDHozAOpc6LDi70\nV/ZGFIJ+gknaVJJtxlUI/jrsywc+YQ06kcXK3qL9IvOV+QyqvHv6mgup7wX6\nnd5QsyH/4iuWRpGGgeC8TNI3PZCVUgRlgLGykEzEJ7WD2nNhFFzbePnk3Bdb\n6OHeeIB8RNQXTxRCc0tx14XOW0uX/MIRoFc0cyxE+pgQjYtV/LqISsdx7PHe\n4OwQ3ZMTSmNUxMVvKSIe/KKdfemjS57UTq20+li7m3MzOGrFF5MrSP6y+hk4\nvyEuDi26iMS+3GVfINA/LnncSEHX9KoPXDHN/kjVv+vPO5A0NbsSZ5AL0HkP\nDxdD\r\n=PC4p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.c8034bf1_1527589766807_0.5401846577527947","host":"s3://npm-registry-packages"}},"1.7.0-alpha.06e21880":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.06e21880","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.06e21880","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ca63fe345aa7a4c3156d5135cfb1add339ef770a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.06e21880.tgz","fileCount":9,"integrity":"sha512-ctTNcaKLEcrsKHuu/ZQXBOlYNwrQtmpLTrMLriTvEEadCgk2qvLqtp1Qy8ze6Z1rd8n7e+SyP+b3f1rXqLFzIA==","signatures":[{"sig":"MEUCIGNiBOdc7u0+XyhuEjQ7Tz5KFXrNExwlULQ6c2kylepbAiEAqk7FGblxh/sBrfXZocvluiLecZhzOc5OhOI7NbHdvMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDTyGCRA9TVsSAnZWagAAbt4QAIzI1nBLcJAYaN8fM+wS\nwdNGzBUuJwQ/qbqFwS2nZVtFAahmncuS/xOb3sXdVV+IY3Tzsif6134pt/ls\naC+P+yS6OYKFDxf9thKU9DRe5JAVX41rX0jb/LkoxgANuu6H8fERTL+7YMHw\nFTNzeUMn95Ztunir/y4EaRZjtiVXNpPwJhfGAwNNf7eBFowBxwCL9aMSQZre\naKKHztiSLqY0YXwdPUg7Vq9W/167KNVl+GFdkVAQVmYbMNBg/EzO44YdQ3UF\n1cLMgnq2c39ftaB9RsuRZTsCuehGgi4RVgWtKKV3QgXN+zBEuO5maufbiBuw\nroTsAdabSJVwSbb+gcI+TjHdhvkM8wNAmJdcDtT7hos1rw1WJGJa8mykXkgq\njLsV/hjFRsilCOa9yDu26AFsJI67gcp6VnOw4r8IiFgvOGg5AR7uwmyE/cA7\nNOq2awsQC4nZDx1Dq7jX8vdq2vomffH58768hps2BsQwUN8iOlhwgS1A08Mk\nmnAEf7TlPMBuaHy5PEtAA/onug796wdKGm2iN7W+TWijwyNxMY5/CsUv++HS\nO45RT2/e4rh67mODJrvWrLeNy/R+Mv9NRLzfWn9H5XQb4V3Vg7euEQJPtoO3\n/USB+kwMaMG29xJGvxrhBnt8wKpgiV1FBootNyxrNq+nHaq3igZ3xyhDY751\nZ6ul\r\n=FmdD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.06e21880_1527594117154_0.8170630736643503","host":"s3://npm-registry-packages"}},"1.7.0-alpha.bf6efaf6":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.bf6efaf6","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.bf6efaf6","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ae344ee135f96738ad61aebcb2aee5f77071a7a8","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.bf6efaf6.tgz","fileCount":9,"integrity":"sha512-QaEmEUUL6QP+oOS2oefgQW1ntK0H3GtOftSggAdwyUnkTBQnipkZDWx70vGvyWSozb1hnpRqz8mFRhSs5afZPQ==","signatures":[{"sig":"MEYCIQCPCAHJXR8Tarw8GBF4zkubc1R45PYLNMySqv+FJ5e0kgIhAMeI6fz0nQlTC35/p+r/uDgklwqI6fbK/OQBi1La1Z22","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDXNTCRA9TVsSAnZWagAAwboP/3XmfJR+qzGNQQIY842j\nJSOVyhZk+eWRlFVhkYe1LFUBWDWYJ9PbrMoVu33Pg4yKYR8jF16FrYgO9vBN\nFSodcA/mf7Xlw6/Ccn91whB7RFB57npgh68RNbi7rutuZY80kLC9AYNs1DYU\n128c5+Oc67rRJosGr0Vx/BVH/5k+jre13Fr/nvkm/yH4Hf7cdtb3fS9gYXFo\nBIUiabuvHnlap2GsJiZH3mWbgHm83/Jbk9i9RFuhGxRNFDJrluE7nMnzOzsg\nP1vDxNBwK9rP4arWHzgj8K9Qs//zXqdCFc1YZg44w3YJjg5QN4I7qJDdZC5T\nCIvkaiyRUQLDJ6U+35F5d6XABh5rsVtHGnTVWfnvKe55JJVvhov97hAqRAST\ntvUITPrDJ4i9yVfvM5DBfSPTF6vBvkIOYsHu+KXhQljyqbx0uXGXCAFMB2hb\nxZdk/JFSibr+clg/zwG73qs5XZNgnP0/fF7c/i/sS6+tEqw81ELjCKsIyken\ndUf7xqQa58F1gBcnL00AXRNPxe+UDQrU0UAY+SPERoYiqc9Ji+G8x5JnXkUz\nMFjesgRlflpwCtg+WEhpNqlSlXBUUUnCqtV7Wnpq7kpqWzHqJUT8OdTWzRwo\nknXxw52G6JIhtq7Dk4EmxkfcydiedW0GcfqQlPBXwWcvy0oFzn+5Zwp5T2Hs\nD21e\r\n=4Jbs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.bf6efaf6_1527608146940_0.42398952410485546","host":"s3://npm-registry-packages"}},"1.7.0-alpha.65198f75":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.65198f75","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.65198f75","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"c7223f57aec45080a8693490837b1b6b4755eb6c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.65198f75.tgz","fileCount":9,"integrity":"sha512-35lGiKbZQwupPouEQ73n5tPZXkEfn/UYhZGLaFagElmQKtNhQOXUF9llDbg4+nRyzT4FoHfRPOeFGa5EuGoBcg==","signatures":[{"sig":"MEQCIG+mdd5RscvG6ePDFjk8Aiuhky/L64jBizfJDPy7MRLNAiBYSDqKeIE5S2tTG75CPWGM2uZl4vdV9MHx1tcog0LaSg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDXeXCRA9TVsSAnZWagAAPmAP+QBtVGGraCrKcDm/QVs+\nsPi62ITpIvykrsrWQtyZ/cjo0fqm6tl0vWm6AFjkLBi0V6oQJkf0BJkq0eeK\nUS51cu/kk+1DlWNjZZERI5LDzTj44KbKT1hIGDW1+5dXloRH8YcfA1qmBcba\nm+RfGmlZbEw3V2BLfA5mBIgW3GByfHrC9ZDc5x96CSaax8rBfpC3DUND78Ps\nuD+yctKB3EU39MRizmLo9Ltl5erRTLdxzE1uwElNJeFVWg9mACqg0qSZcqjF\nX0ZJRN4HBfHWCPGdJfWhki1nqOx4li+pL7tunNPiK6XwiwTZLspNKV5BhQk7\n7YUCT2O647wMwHdgo2rbbOgbN25ADvr4De71h3gmZVjCtEY9zc50V8l56YqE\nE+MODdeZK1UxdoKWMdV3DosE4TUm5pWCE8pg+XVglWv+0z9GcImMQy/OTxGj\nJC6ouFgko1P0v0OlxUpu/Q8J9aekBlHe5+lCf68Gm1XHv9B8eYfDOGX1ZUWR\njTT3dhiX9djchySBS0uagTNHk/0YJgihBg23Cytb8rwkQUf8eGvTdYndU6g7\npaxCNDRL5DtN2deactamQW60OB4xHxsrLDnB3WdqDaRH/S/Iagev4DPW61Gg\nDe0b1AoGJJ+K+lhIWQ0vPY5M7M87+Bh3ycJpwBd/Q5dYgbp4K6tdRNSqm4E3\nsu3s\r\n=sllz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.65198f75_1527609239266_0.520858521331693","host":"s3://npm-registry-packages"}},"1.7.0-alpha.9a981ca3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.9a981ca3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.9a981ca3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"5e91f8db697a2e3419abb053c3b97fa882b315ba","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.9a981ca3.tgz","fileCount":9,"integrity":"sha512-wNOLhrrH5zpr5k7ZVnvTiBubogm0oRMq9Z+xjwNjcLmsbFk6joVr0sJkn9Ml/qOQYuBg7bXMznIoDt4KJdr+Vg==","signatures":[{"sig":"MEYCIQD0NoQMIgtyGulm1foPXdXgiFrPLL11Qg2mm6ftQ4z22QIhAOSiFamxmwXhmqMzARiHKGBprBZbcp9tyrPKkD+eMkY5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDXvaCRA9TVsSAnZWagAA0mgP/25gcOvQY+v18cxOFX+y\nw9YYn52iOMNEKBOYChFtWUtCgo7xGxei9Ddj+Aj/gdrn0B9oh+GLyqHmOKEN\nNUMAR6CF4flPcGpkalpPB7hJ6yglzsTAp3vn9ivrkTE9GwnVk511Ump1NUeb\nwBlQkUr6xLTh19QqdOolpT09cJhmkse14rUeqQc0pwgUD9zQFhf47z32gXHl\n76+LkZp40M4D73ICUfGzxzDOBR4c3Sua7vzFHzIjnFozBB76ctwAf/L3Xx8I\nEUxLfBSREIaGy8WLoNfqhYMKBq1Qfksp9ShGiQcdl97f5VCMkcdQfrlNj+8t\n3nElKHtx/ANndsVgtuYWgWwLMrP2Sh9aODAFXEXR4r1xxiLve3KSuCl5VhVw\nWlCCPwPUsA2jL/wfC+MqZb3X1DLafvAuHOWCvHLt0ctIP4ANUKQVXtbmGr/C\nch5G2fLmPwJo28Hf6LturYC1aZ+qvR9P4PSQTvinvzxf3opF8qKPU8hOj7Ni\nOw4c/wRg+aqWvz1+Nr524sCE3F0R1X5qQ25plcl0T/JjmeXDuRUR30QV2xz3\nnRpYY6WSigv3yGT3pOTXku5W130uzMQ8WGVtamDIxZ1FeDtwLsGClSnrNpYd\nZAPTJQhNrocfsbwduX9rScgS5UsYuW6ggx90yjiYzmTv++E879r628c78C2z\ntRHm\r\n=zaJP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.9a981ca3_1527610329571_0.5995673330519018","host":"s3://npm-registry-packages"}},"1.7.0-alpha.f8ed323a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.f8ed323a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.f8ed323a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"755d114086d11f9b0779dbc380efc6db8fc05e30","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.f8ed323a.tgz","fileCount":9,"integrity":"sha512-YXjtjVdCTMd4kKZKQ+uE6pPLJrFZh+NX/fkbnlxFa31t1n9i+BmCQF8a9ScLnTkQ5vmApjy78jIo5PUO7eUYIQ==","signatures":[{"sig":"MEYCIQCvx1TPlsrS6oTTt0zZ1uzpXmGdZM8FsPF5Z+dCwzENDQIhAPbf3UigWa5+7z0MleGolDS2TauwvELb2mcdB1NV65LZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDZDnCRA9TVsSAnZWagAAbi0P/joJtqitN7s+sDm3sLsl\nDWF0b4B0HiyqU9oeSiN0R7npaCRIPzPhTUKhee7BU/DdKMXGUTQUA9wCxQVs\n4A6jv9DeKgnJIyZmxsE8FAxbrEiNSTRDb7oZII2QwdM6YPZYiq6OKtHgCLHQ\n4VGeNZZZIjOWaLxHAHmUwNC1RdnsYMsCvFEfO+So/p6F7nZ7oGZaS/2rh2iq\nMMiea3E9ZqHboV6YmQv3u6oMkguGsgKcwIAerbCbuS5SoVzuG8LW8+T0QQkA\ndBgYGODw+plXXsDvvE7DxivFKoL/hGInOV2Ek3gG6Z8PhADzjr/POpkZGdCk\nJvJ4PYOr+3AA+pI2vk8iOkVxoNTT7sEx0w2C1QQKV9+wzplQZsYo7725swjA\nGXikB2AXZi69H2AnGhVOCwHYg6yh3Nr7gmJiuFXsYm7eL8esIOCtu8ssMrio\nE/8Y5KyTY+10v5zKt7m+O01ZOaTCvr9D6idFvM6NGTTa9yYCCvSNV66PQMu+\naCqK/WUrJFRHIsvr4WT2lE4FmL4ZJoMxZirBCM5Pib7fieyBuk5XBOVWcfeh\nDtwugEtuzA0pK3mKBJS3JnKGiJsHRpHM/ILDqjBAjahfq52ucnkjA9fpIsoN\nImvEZiwjQ889/3GP4qTC4Cz294Dt/SD90iaDTmfSE0FFZKuPXzOuS3BEr/57\nAkqd\r\n=CNBZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.f8ed323a_1527615719235_0.3463352228893266","host":"s3://npm-registry-packages"}},"1.7.0-alpha.b3aee6be":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.b3aee6be","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.b3aee6be","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"79466dfdfb15b53c901bb55f3e9d4c6fcdca1519","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.b3aee6be.tgz","fileCount":9,"integrity":"sha512-E8/d5fNWrKfGRJBDtOpSKyWBfsv3+8vHBkhviDSmhkWy7MTTJKHZUL78ag9Plc+CxcyWBZ+lTbIbaTLen/LoAg==","signatures":[{"sig":"MEUCIQCrGKzNtvvxLyAdgeOAPlxIlcOOqz0m3jL1+2DPkBy7uAIgLGx7StR5FvHtCJP0iREzlvB7JFIwfpJerVYSqNWzo5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDmkLCRA9TVsSAnZWagAAjdYP/iTIAUDZgM7yM/N/LKYO\nijomgF/SWG6o92NDhqA+yeEer0hOOrOpNbYURGjci7RjU4raoZRzQmnVok6S\nS9ikFv+AA6vUhQOxE99leso/ZT4JZ36hQBjDIW7shwABkTnX5reNjFekcul9\npKA0ajXoS12vWnsRIw1AC/GMIbBWodk5IZSUit0KiqKjKbZE40eQszC8RjVF\ncFiXOAn5Ib5DRuIaXyerwzLGG/FG53xDvEfzRkctI4mQWcaztqRF14qvnXkk\niFpQjj1w+pCr268YQKouo5RMLc5VSvRMylF9D/0VFzqRs1vXo8BlWfghTyoy\nb0ffmWrs6jX4FdFIGTYoEGNoPfOdXuq8k1Na62MYnZIctwN19bdn9AFzkC1f\nT7K2/z4KvYaXmBBzW/IAWhCJbgeZ2nfcbYyje0pOzLGx5fl3k1x9meRkBC7d\n/neTLcvMDqso3bzjxi/1M4Y4TXWv0qToKjrvwW3/pV3lCWsgaH649ZVsJ0B0\ngl106H/Tsaf753DgInXJY6BdmB7Y6YyZAHd7/aNuiZDP4kNN/fQ269FZsQsH\nAm5kzc6pLbjO3mNizLScXnJNhPoetVe9LMWUcYiqBBdRxlOLCfKwG/E7dktQ\nWRX/OQ0FrOj7zyr4RNdoKrBxcbmUDLZuZAtz0UuxmoSGGsuM4iwzYwG2b6bX\naTVd\r\n=Pmd6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.b3aee6be_1527671050798_0.7714541341714045","host":"s3://npm-registry-packages"}},"1.7.0-alpha.fc31c912":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.fc31c912","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.fc31c912","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"928b1f4d7f3fee8f728a778963ea894e62de1b2e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.fc31c912.tgz","fileCount":9,"integrity":"sha512-BAHAJIm7uE3ES+Q5ulhnnplUX6nzw9EVs8QLuXQKaGC0oaH+DEE15sM6FLt5dzkJVHLMlO+OtSmhiVcMH4nQhA==","signatures":[{"sig":"MEQCICZbtK1XhcC4EzdZJkpbMNZa9dJ8O3mAqsInLdFpRQVOAiAohFxc35XdcW9+qkaKUsvr0Da5DIilLKxnqOQfaR1XAw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDpHtCRA9TVsSAnZWagAAln4QAIXU3Wi2kQxwJgvKUUfp\na0wkVk9wAIU55LBLLHRpU/JX+EWHVH5y+0z2A2HozdgfRcjAeFd/y6EX8D3o\ntiL25ZAi48HzwSjH87wP4NeVCyMDu7smnx+6FqnutVNHyexbP1Da+8GOKLnP\nvoCj9tgGzU5cpDFjyqaxFBn3anXZ202lBFEbtHWN35Q8xNcXMsXfjgyh9jVN\nTaRe4a/Y31t8hOtWcO8811PKUB0mZKboWkpx2Cpnmg2RL8fhFUxA/CVkz36G\n7nudreOhwnD+xa1vEm0Xd4PiCvXCi8l9v6SEdEKKmuBV3uO+kYxE+MOueKuC\nZgEAbMylgvd5qyIsVNzAQBUqjhnN4kkQ2Vi3FD9nhFKAh7O7ZNK90NGBz+m9\nbgMZuJbHDK3k+p5s9tW3J2SKUB4zFQWMLTqXFlEpI07beflR2v31OgJydSxM\nKGZtuK3QEwczxSPnesP+ONfRwZuckWqmffe0BqrWbh1xkCWcvsNJBYziSkBo\ngsh98NTm4BDhOjVNgj6wiZAWwJlCZuRWaO2SIZgiNIManOHCqsVIfZhPWnBR\n+6lR2egOYyL8GjOLgLiUO/2nFEl7/Oh2Ecwb8yIYBaBVVa775ZQnwPCciZ9f\nQ6zdwJFmLbkKhLQBdoUzEPDRoGGbo6jI3Naufd8PnMTo0ojsCiroqmGtC3BP\nIKXA\r\n=L9D1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.fc31c912_1527681517292_0.9413326881196313","host":"s3://npm-registry-packages"}},"1.7.0-alpha.534a3cb2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.534a3cb2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.534a3cb2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"e075dbce771354a90445c10c684158d71d6de00b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.534a3cb2.tgz","fileCount":9,"integrity":"sha512-kIgveCNTc4emmoQomMzbPIvboimwzR5TTtRHsVQMl0+TspmsQUOscdVELP/ewrNCIKaZs08p9mEBC2MPXOF/Hw==","signatures":[{"sig":"MEQCIBNIZYa3253y446hXLQvVQlCLZW0lvaao+vwC+KEsoKbAiAGMD4FyOVxvNEghki0UNPR/mQViFK/2Apv22QWoqlMbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDq94CRA9TVsSAnZWagAA4U0P/iMaXj2RhHRTz9CYRlcP\n5vrEKeifzgQe1qxt7uOMt6TTf0WkVNGwMWIqqwGItuBiSOz1FLWYMLTVgRgn\nNPvYNF65yiAxEj5XPJy9PUlFbKoJq9zTAKrNdLE48F8RebL2H42du7jGKc99\n1JJeXM6wxrzfAFchy4/0Gj9NEIqvPlIdC6KrHxHNDqG9pko0dx1Jnn9QGOPl\n8lKSHWRnkjekGLtiq98LEBA0miW0OmRXf8TrIvgOPy8fZDHVavvePf4n7ril\nrB4LKhqF6JdlDWXrL6tQj2UWevuCl0T7a5gVwm8oxffnHY+xUVp+rE3HguMy\ng1B74tiqStzF8IbsA5rBgaMxeRU+E6+GpM8ASAz+vOqL7fqkXlEs1LT1/HdZ\nKShySlpO6KIMAvQ0lyaiFH95w4KTnkzLaEP/BgXMpZlpid+zvqKLm69IwDiK\nI6N5IcsrFUQgNvXBk3jukNIq98BoMKcuKVoWI9pHH4ptczAct58At2gQdCFD\nDbDrUwFvbdMSbR439Gj2qDL7RJAyuPG08TPW2UYf1dFtVz9UA1fboZfr81sh\njnzarU97wDlxu7ZXo7vs+AVGgW9Z4e4Xl9JE3WRiK9DdCjwBNJk2Pf9lyr51\nWxq6ywLa2d1aXkjz8KqNgk7UtFEq0EA1t7HdzDLfxYhrQL4ax3/ZBaelU99h\nwmEK\r\n=V5wu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.534a3cb2_1527689080204_0.9513788826827612","host":"s3://npm-registry-packages"}},"1.7.0-alpha.f80cf84d":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.f80cf84d","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.f80cf84d","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"171501a2d5ecca597d86dfc690eb96edaa7f9d38","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.f80cf84d.tgz","fileCount":9,"integrity":"sha512-m6QPwTwTabcrAsPunPljrXxNro056G83sON3tIg019usiTrr0WDFPTllZOoxCmj4rxGoRCWAog3JAr8hz5mBtQ==","signatures":[{"sig":"MEQCIGL++OOff7+AsaSkIn84gSVQ8/6xeQDEw573YtKdAWdpAiBWDV005CHvek7hVos8LgdH0zgVl9JuGKtw2uWWNxAKsQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDtWJCRA9TVsSAnZWagAA3FcP/iNekzsDqmb/QcnyNvwF\nvlps/U3W7c/5ThxXhWo2GbbAfRRLGeEjjXMf0Hpz190/T4T3tC21j177O0c0\nVm0Vpq99BMzPI2qjGM0m4JNUAhTZohksMXDhE1vfrw6jtVmpiaMIaO6E0Tq8\nItx/IUapbYlJaDA1dXQatud74K+mtjcO6CcZfG+6Wz18qAUTmHU1MtVrrwKH\nbtOiUaUUQHQo2/PljH9u0S411SZODrwbx0rprRNoIgVoJ9rm8lotDzS/lSKn\nX35ur3Du2RJOJtt1zIyZulD9bZTskLv5gtSanYldFb8eqLEAJST3Av7qMQu+\nP4u2WRNLAKDmw4HEmGTSZ7dyDw+VVPdhB5lnrt4L2O7XKb7zi/A6GzMqpRWA\nT0lEvWTt5tYYjrEdu/nV/ZtmnK0knB6A30RaFFEAr9v/T3+4jogCjhd2a5H0\nbnJ3LIa6xPZrPme/NAfNVIx6DkCINZUTzHgS0Ig1V5i9db3M9X++bojp/MmB\nJiJvQXIZjwSylOiZZieLnBuJ+feFVT1Vh+mfkKvM2npW+zXR3CZNwkFZRWvJ\n0gemv1MHtg52HDMzjAe1S0yb64klMKXa0up6+ATPZoq9XtOJWFRWMF0w12l7\n6EEF19GY3fdx/zSMfVBPDvv8HAWEiXZL2SnYQ3H9kmURqj/0spkTG4F0a0f0\nSf27\r\n=Rju+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.f80cf84d_1527698825055_0.46580479376700934","host":"s3://npm-registry-packages"}},"1.6.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"d63b326cf5de3a6bcbfc005d0b389b60b82777dc","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.2.tgz","fileCount":9,"integrity":"sha512-C/laxAVpuuNDHCkMbiUEFt4+iwwl8yt1PklrDRGltCui5b3wCnEIuK4oPCmw3U73ToRKq6tqiFH3fsAI+KikaQ==","signatures":[{"sig":"MEUCIQC6IPpL6ZvWuOQL39gKw5fj+M8vsq2cWweo7Q1pPONb7AIgEKGm+vPt+mGmOEoDEXW8iqYDY7gNJa1ZOrvE0LLstFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbF6v6CRA9TVsSAnZWagAAWvUP/imQF0acQsKqiSFozKWx\nI0E4496hoSdbEcMt+yBcxfVBfMrDC1T7CeDGRARaJ8SWHdbT/t/vNXrZd1ve\nRI9xoaqp9tCE2OfondhsWppHbQ8tlZu5NGkr6NH7IS7zpWb6DdUtlrTyeM1A\n/BwdXoMTzMj4xEZKXlb8SI7/wpnvyqIjyvRRIuUwZZ8XtKVfXgXc04m6VzL+\n/miVJZiUgwdk1rcWul9TAyr8HpmiSvucuZGhqA+XRCXrVJdylCoRog8gg2Ng\nHqsbuwFW7yFqAZtga0osS8gStK6T5FqFukElTEKQpdoxcLR0s/3xyI/+09WW\nPH3fp4FpMY/b/VUwstmO3pWZFilfx1Vj67uWbegtKXjQ4ZEzXSjCJCKaQfcj\nPnNHjpgkSn3yy3m+L9WrHNwrYOsNdVrmPK1iz4HPA6gZMo01v2mH/CbfU0Oe\nGLj0AvxpNFPxk9s+vnEFdvTCi1bJJ1ZqzArMSDglF+9zargkOEWFr0vKP9xL\noxTvQZuqU5ea78E2mzoy9fw0eZIilwe1uR8Q6bDb6VzkSrtLLriBEiV102UL\nAY1TBY4I98inqdOdSEi9YzziPaXSImgoxroUw8fdMO4EE5NMgsq30JzO741E\n3ySBKb74h1I/iGjdz96GgcO1V93/MhSVsHyJoKd1sTadLJMXJjOCyVv3HPsu\nHAut\r\n=MjHc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"cdmgcm","email":"cdmgcm@gmail.com"},"_npmVersion":"5.7.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.4","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.2_1528278010224_0.7984968261460759","host":"s3://npm-registry-packages"}},"1.7.0-alpha.fdf77e12":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.fdf77e12","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.fdf77e12","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"00694f1dd8375e1670d3077d6d7f7f9b9d8a070c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.fdf77e12.tgz","fileCount":9,"integrity":"sha512-+PoEI80MQV9XTuaQtopXZoxrkgJgJ6/axPxsTAkOvkNdT+yzzF6LbfWb6eTlOS935kwKhELi0Wa64vhpaNf75A==","signatures":[{"sig":"MEUCIQCE5PNeKd2FKCstPspRDafvn0TQE4cgx7YfNQgQye7MQQIgV4BVKZnTus5KzAXW0Z+5cunZ7d8gN0QwG3w+UfuiMTI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGmHECRA9TVsSAnZWagAAbsUP/3dD/wS52PFBDbsOiktE\n5+6opaGcIQj5cP7K2mTYDWBUnL543imfhFGqY/lKA8JkQJjLbg1ahTgDrwlw\nL+VThKPlOe44lmth0Hr6jg/XZEmlzDS5/z5tkvjf0SFaK8YqjHNFj59pgIoT\nAh7Oi4Txzim4oEq0Epnuc3vfPNuOWta22EjDEBzkNsJwTE05ctcfYdA1Uh1/\nEm+s4ZwwqNtKgfaq+/G40eFm1PQ1h3mmRrfwsybICujgSai0qESMRIRLPHVO\nmAIKbyl38sD4jVBWWg558A3O+TF+o0ozJhBq0zhp0tzV7VmHis5m135TGduU\nmiOMJD0H7+QmvI3acPj9TpkFbo3JcdOp8BEuUQuEYnzYhZsr2gBld5ipSrMU\nsi3nXxVEIcutGKD4hfz3pL4rS2GiUQJ3RxuadgvwebsfAL5RitfR11/x5r4l\nkJlIN+YrSFOtYucsNCEXkTT6wHGvUPeA/APzg5axpelGk7YOfA8JbLmX0QVN\nlhJnC5mPpSTxH8yqtssMMsxUrZxRs6heIVhm8YA9hLo5rLRp2YFglvmD7Ou1\nHQg5PP3bFAAB8IZrI639RZwSN8H3bA42LdB2VrNQaMeXpCTAFKMC6cYy8pRh\nK0JO1p59aGrg/Iwqm1EgPeMJHG1KsTzPr1V/71CsqM/thp82rBRSM/e4p0Y3\nqibJ\r\n=YH4T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.fdf77e12_1528455620219_0.13347243050411817","host":"s3://npm-registry-packages"}},"1.7.0-alpha.c492b8c1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.c492b8c1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.c492b8c1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"f9a797cf1bee8a1e936f5b138b731a34859a20bc","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.c492b8c1.tgz","fileCount":9,"integrity":"sha512-T1bME+ZF9bqIVlRRy363rX8z36jeOMFxQg1cUe7cajvOHnGTVhBrjGI6Z3z8WfPIfTRlaXEi/Cfk7fm+FzZuag==","signatures":[{"sig":"MEUCICHHpztTLL9FGogtI5fT3xa5AxSpsUnTfNLbWquIeiT8AiEAx90gWnwuHEorAzym7N5DpAJlLthBeo4sXC80uBQA+HI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHmC9CRA9TVsSAnZWagAA+qUQAJcMIO+6Nf2P5zisFO4D\nafPWhgtoCUZPP3VSUYKoLAU6/YZPY0zvMxiR/u/3J49LkWkrVDgRu94cuOgX\ne09PHKhIw1EEyQtK9E+XqZ1qtvyzZoqclbzmqRTXNzjSIQiSq2a5ZYbneku9\n6l8veMWqyMW6+uHalMaw8bDKtztr3Vyqtluc9T/Tjn5ydXZW3iHwJkt1OoxA\ne1Ehj5qIcEUMW4rost3ivXA8ndPker3LyOet8fnJy9Es0OR1N4wBgxsXFDdc\nseaFxJHjT0NGDolCDevOquYveirzIktUQTF81FzbDqJ1ThGTfqdyyup5W3hZ\n4M2HLTIrKFVFSbbdl+ErJUcsZjYFnZ8DaM5SrJ1tHyKS9pVzXs4KkklWA4MG\nfR+U870DQHq3C4gU/d4vTI1lsLaw/D5RgZiZfSdjoDHgAIHgBk/BoaEvaUT3\nSuvQ3MwjPxNv/kANGMyMh5p++hL2xjrmZT94D2bxbmRQtebnP+WkeinVJsAX\nbMZa6UPcn8mcCHLTVGUpCiqAnT+PUyrasPWlsD/DwcoSHHIxiDRMQmcNL8P+\nHL3uLDdtFL0kWVzlh7Zh7EnBGGeoGfQakdkf/yrYcQqSRUx6rnxvLuGfNVX9\n8lsGrz5o4o2fW3Nj9bLfaUi89P7gSzt1rzbKjKOe+B7x6wMQH4YBqrQJTlih\n6v6e\r\n=sO2M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.c492b8c1_1528717501133_0.5774969240793693","host":"s3://npm-registry-packages"}},"1.7.0-alpha.5b11df8d":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.5b11df8d","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.5b11df8d","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ee585d27da282f5dd5c93dfbc5a42ce76d98bd56","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.5b11df8d.tgz","fileCount":9,"integrity":"sha512-xJAn+FjOdK33Bnvu6AsS/QU/vFrztmU9zDvx2BK8d3Pa6x4ylA3mMaD+9Cqp0kT6SQjA7pN9AALSxV9FrnahsA==","signatures":[{"sig":"MEUCIQCHmITO80oQKAHrLeBZAw9QnQ1Z3Xaj++V5uC1Pi+RS4QIgFyLcHtIOwogTiwmBP/hIy/UBRzbIk6wharYOVOt5i0M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHmZDCRA9TVsSAnZWagAAaEMP/2AjmhUx0EKeHEZ9UI8R\ng4PniTMYK6dsV8t1iQGeoYvsWNed2AzrCTJHvTgJO1Q3ZmmR11FmXxZV+jfc\nmYgOQwJPor/kG1kxC/vc2B31xyCylpcsk5pCX9T0IUUZ0XS1kzqLbUr42Ota\nM78ez3aZ5dBAL8tPCP+aRB5ADWcYt191Q5Cm3N4gowt9yqiy9yqXxKcnnchq\n6N8TwFDwhfW9zqWWNtDK9B63W6JiB+1FfkCkuWzrhI0cPbXIBTAnrCKvjmi9\nPLWkyhbEaQaO+ZhLFdlEAizCYW9trKnBAodhNoJvvM4Pj/ZfNvs8TTbfjXGT\ngTHXMJrZi0IZ+j7Sbdsw3H+tViitQehRxeMWUV7PmFRawgJyNfuR8Gy38nGR\noaWPN1azOYIyEp/Otie9XVnSZ7VE/NMdzg35xLiblokge6wcohd91Lp0fo1l\nv0WrpHRLFJ5pyyNug/yz4bvrjbbjXSUc1UjgqnwazdoAdZzUCRdGzqlIYuW7\nT7Ym3My9xrZ76MB5TiRWbkL0s0AIbL/Qk1ZhDlLDCPdzO4BEMCdYSmkOf9M+\nGouNeihcs9rSWuWu3b1UgUhefzFvi7YD8VkjBuIEHM1tpl23uBstiE0+F22V\n80cPQsw5GOEebYo7XWkijNsqGZNTh5frEfaKBuFIbQA4TLNXGSp7b62mAX09\nSR8i\r\n=8Sde\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.5b11df8d_1528718915521_0.5920094512312151","host":"s3://npm-registry-packages"}},"1.7.0-alpha.78d31f37":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.78d31f37","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.78d31f37","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7eb21fbb104b4e4ce38d6d8ac64cd2e094849574","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.78d31f37.tgz","fileCount":9,"integrity":"sha512-iEJQLdRNadH1AIDqRd1xA1uV8ijcbBOcuokT4YKDY8KpP1a2aNZL0CgUK2KAYNOtTmxOkGcyebgAZMMtI13Ikg==","signatures":[{"sig":"MEQCIB6uFHKIa6J5qy7opsn5OMEBli/xxJGnwGplB9/rJyAFAiAQhMQr5h5rNpARJUEQNirtNr7jKefvA13wNYXfNlxerQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ4RNCRA9TVsSAnZWagAAivwQAJkRPhdvQ5ZLZ/jUG/Lx\nddkfcYi/9YMFpZ0ifnTEqCHBcfi31lnL7u5CkHss+4ESJ/vBW4KLbG15s6OP\nGiDMlphamHWmD5n4XF+cVAowYQ+VTYofitgS2i6sL72UY4gq57eS8ihFtO4A\nS0lKLHfRpbADntp+1IeVEGdNV8eHx8BqeO0N1gLjCZBwHCYmatXs/H+Wlq9N\n1e6Pyz08RSy3mIFyK8R271owiDUDOPyNRTYoBG2ADdZY/DHVJEnWx+vRpRy/\nbKE0iudkquk0zXc2IFAcwMT+grzHFmpP0zgTOW1zb8FJFqyyCJ0EDM5AojUc\n5khopFoDUnf6dwm7eyBbImoTFThjKf8DH45Soq0lE2QgVDJuJabUoNLLpKmv\nUU7hRMUmaUx5ieW17XRTqn3vzBVGrP6iTMlxuMOLtyLks1QXIK/Q31rFSFmO\n7Z25DrxbOYifUXoU9cLNn5U5gRt7TLdPTMS5rQ4ppf4DIwtTm/PAOd7/s1mP\nolVMZGmoGEDWZjO6U0kD1ZPDX+b/Mvb/LcTp/w6VFT8purHzpOLBvomLj2ue\nVWFSyt9O0ZVpeb7+eT92vSlBjLoTsNVcRLKlJyfYMLd0ygIZ8+LC1BHqBtgn\ntMNcBHGlqT5LsJkuMug9z9ri457HD8+Y0yf4o+qWrLde6SHntYhMxKPjl1m2\noCaV\r\n=R8cn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.78d31f37_1529316428873_0.021454544800680653","host":"s3://npm-registry-packages"}},"1.7.0-alpha.3fb22e57":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.3fb22e57","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.3fb22e57","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"fe3461ea64722ac15928e719e33d31612f36d03f","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.3fb22e57.tgz","fileCount":9,"integrity":"sha512-NCL5QEL/cHb60nsnsF03dxbccMiW0IHLC9WUTU7S+SHYR1VI2s3HjuDl51AKJM+/EDkDGgxtKpRWI2ric3jWOw==","signatures":[{"sig":"MEYCIQD9Jh0XBq5GDy/Yb6Gn3IVMHYk+yN0sbzfGVE21Mz4haAIhAJ/8gjnzR5Xr5YUdPYlPOY3Pw/5RK58GBMc2IlX49jg2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ4oGCRA9TVsSAnZWagAApoAP/RDl9IVc+dlFkHUAsr52\npnKbXKuFRUXapaoisu4plXACgxHZm6v58/ZgNXND0vOtKZu/AnTh9/OEHFjV\ndNdlrmm1MJ6aXohs49iuJxbIJp/EbLQRIMKjCgjHrHKhos6Mh4y+2544ndYf\nLFSlcZrTAYCZ5ApNEx1HYvK0OcUm3UuepbGtAvmUvCtnn+G20mZNqGu5SRmh\nAhkkrmTNySC39TZuq35j5TOGz5HgfegGOBtQLeDO0KmBF+4foW/tHZFmxj0C\nG7LYyOFYMc1ZlZ2KRzuA0Nb7e3P+/EWZ35ig5CAwPXSJYeIlgXHdISQGy7ub\nu/vmGQAFIRMP+rrxSjoJdMl239h/Vo8Z8ah3lZ14hoZY4R70x7YD7rU50G3g\nv4DsSdl7lLCN57UKn/zD0VvEK9Qm2bvhqcs5Rdwr3FoUUdu7ReHNf440fo42\nZhagr0I3KHI2bzAOdVzCBBPSe7O0LOEjc1cIbLScaeTxZkrYCX68dDCzNfJN\nveljgLQLAobvD0q28IR67dnVip2ItRZB/2G3qCmju/4Q9RgS5KynkclWXpON\ntuv8WQCmbO9Hu+zhddkhGlopJSdt2Iam05i/QqqnD+BzOVh2eUmjW1a+s97w\nAYuxRAQnvfx0zWOP97jwiKZReWvYEOnjjVpZRwu+4XWdPhReBFSBsIO6+GPM\nH8D9\r\n=/LxK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.3fb22e57_1529317894056_0.02178419287677613","host":"s3://npm-registry-packages"}},"1.7.0-alpha.3dd425ba":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.3dd425ba","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.3dd425ba","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"510103c1d3b3c27210f825bb1a7ec78590340ba0","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.3dd425ba.tgz","fileCount":9,"integrity":"sha512-jQgYcKdStfIRptd//S+s1zRT9mpLsOlfgghvLpHJwDBh05Ek17w+ho1UZqB6LZ/nVnVGJX76Vx5C2sEOy5QCPw==","signatures":[{"sig":"MEUCIBl/mimkG69+uhGK/9tmK1OzbfdvgGiQbFr5eKvcXgz1AiEA8bSmEXtuYjm5mDcyGFCEZB4P/UVXui/zAm8Pl6/1LtE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKT4CCRA9TVsSAnZWagAAzg0P/AiK4+WJUwdJ/M6PzmsU\nIcLQFOeueifItrcECqI+kwMrew+kYqjknvN0hQKoJbXnEuj7l2mcvgnev/mU\nmnr9KBCfhOhjF50l2sukDB4Qp8bdNnYUXizMkwuhOx7ewW+USEApLgu/7btk\nJIOPL+YOtbyKTKQcLj8kFfFezWC5tYglfI4TlELCcS6XnKe7gWgxfDfFUzmo\nv+hexBUSBHj5yKUZBfgqFc9oyWzrYyspWPbDxPnCPb85Wf1kOvE0A/dodqO8\nA17+ls0LftQWT3oPyh0cbhu4cUThF3Q3tPMoFO0l9uGLFNT8iWOXgFdket6k\n+hg5Qv+Tn96NXCpeF7j6CBXX2n8jgqciIqmSET4m8/wrfJtWaArWc3FzxH2k\ng8d2kklMYI5pm8XQuUw37vbOHm2P6CK62UqwORdvIfU9SvALRbYqFGHkxxEW\nzaxKcO9k774mRE+2flvlhyd37Hkf99OIHbXF2lgjFF/JndFdW7eCNXTtgH4y\nAXWDi+VfvM0U8D87YjrQnhk3FqOUZHh0NfB6pIXK+5Wh5cORA8AAo/CdB6sS\ng5GiMdLaGGJj5SzBLZxnLyd4iCCILTZusPMZ9sAgSA8X5/yU1DRCOcCBWBNX\ngLila9iNJsC3um0xNIBKll0BcDWSbaGnorpVFVOiQpiPWVXLTUeZiwtB2zZU\nvUe3\r\n=oLgI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.3dd425ba_1529429506146_0.1521012195431355","host":"s3://npm-registry-packages"}},"1.7.0-alpha.a4cf9b28":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.a4cf9b28","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.a4cf9b28","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"26647613977e1f62b58e8865fbc29b429aa1c7b7","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.a4cf9b28.tgz","fileCount":9,"integrity":"sha512-58qmhJeQM+9j8yogzcZhMTLEZgrAiDvjcoz4HCM053JbPXa3mpTVoeT1blMWHpEwzCxA8pUdGRbMQCv1MMqeZw==","signatures":[{"sig":"MEUCIQDoxZvyWm8+C35hiWnRD5uT25FxD9x9QaKoM7QRrHLdMQIgY9fqrDs+1f8GhZ9/DXpfmeA1fxyNXanSL12hQM0fyXo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbMPBeCRA9TVsSAnZWagAA5EYQAJaIoftJFdwqfAIn5m6s\nMu6p0NA11hMJAdvMgfCv4YsnBs3VL8HAEzZZ2iPNSuK6+QXL+QKtLBuXpHc5\nZ06fo283IgEhleVd/X7/j3lxIDHk+xIvJRlw5MfthnvCH3N9MDxDfzEZUNMb\nUqoKknEj+PONRGOoUQN9TAeiClvHQSZ6ZvDm92xjiXeY05icia65Wgy5tjLK\nEr7j4b56CAnCv1EHcRIOfyGYT7ShPiFYXr6sdj392hYbFpxGic+a9vUQ0UUW\nCfJFWOmaaIFR0pU71FVNiCBRALOj7PRAPA2i1D1Ugk9Jl6H86IzqCDENOyEu\nKLjmJul+GijPFxzf4SK32TX/WmU5DiryVKlikXh2+DhF08rNypVSFdIemFGe\nWnl9hUjNWKJAopuDKs92girL8xWlirnH7WUCh3e7PvNtkOv2wrRuQRbPkiCs\nOOXD6+1u7n1conBDA4N38tGSVB22v+Bg7mjYddilocuxySyqqwy0GaX5pLiR\nCkGC/LUgktYuFXSAyMhXCDbt3tLv0L9U2DGA5vGxMTCwbKPqyfY3ym+6/yi8\n7NnAhrgj5MENDx445xSZOP5a24RwfqQklGJxuZlPabz5y+fvRDqlvRMQ07Y6\ng4Tsn0eSoKpO8zX3XdvO2NpkI/0YG/e3uDBufs48myDfyu0KYnRNn4OMiviY\n37S8\r\n=w7nU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.a4cf9b28_1529933911850_0.0027259044625971285","host":"s3://npm-registry-packages"}},"1.7.0-alpha.dbd1f93e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.dbd1f93e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.dbd1f93e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"9dcc1ee30bbade84942251b35e47176836687212","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.dbd1f93e.tgz","fileCount":9,"integrity":"sha512-DW7Ib+KQBMt7vqMfj7AsG29R7ZanP0qVMlyXaTIwylwRW/7nMZM1F3zK5NPEWHjFfEFuAV8vNxBSA9fTv+GXLg==","signatures":[{"sig":"MEUCIBYnjI46hLbc3ZGOqVuIJF+Ar8EkuaztbPK/ORHzSvKeAiEA4HDFdqZe2Aa4syHRHtGtwzw2eet6YrAS+5oEuMCEX5k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM5UXCRA9TVsSAnZWagAA0KQP+QB53z+sprTHe8Azfnlx\n/TefTfOCiRvPXfvEspEyjPvmTEchM4kyxjb2r7JALldE5bLWHjA/Osp/wKP4\nVRZx39nffM3PCbmh/4I1XhYnQf607l46inZkdD0BxE66bYnfQqJtRzQH2Rh5\n51o0QnaKfHS/yUeHJRzUt8D3OTwyXaQZYl30T3f66TTcnDMpO7mDiQL9VmzT\nG2bxHN+lQsdu0OlgEG2mwJaCZi9omcZBSHBTx3FN6cZQECSt6fj7hJO4kw/W\nMdgInCgaWTeK4yDxNk9KHzgVDxtDFzuIE/9HOR+YdujnLoqpr1Netjut3QvK\n3CIMRodCYzdIPDN+45Ot4VNtu2OdS9ms10pQNhReZiGfGzxsANITGkMchAN4\nocg63uQlDVD1FgG0MBpTKUQDUXLjxlKk7Hc61d21/FhPpeNU8nNCRAOScbPt\nNFoFaQZKe3WCBBRXErhToCeLeiDTBIhz1iuYLx+cNHWJDjriBBFruOuV3uz0\nJXWRp1Rf8Gx4bBGNgDSiPILa4Suh1pbhafQ8wvF+rJ51XB1YVEfTWXkVNzkd\nbrCcz9lg6KzQ4f+mxiQt6Q7dVICJy/+IaYI+QB9PtDRNEA37x2rApxiMXqWG\nXipKQn7NW9c7zKyagrlcN+N4DYXEesuu8yWAZ4Ep+CZXRG2uuSj9A1MEItQx\nL88L\r\n=wnNg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.dbd1f93e_1530107158821_0.29958551229917796","host":"s3://npm-registry-packages"}},"1.7.0-alpha.26edd749":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.26edd749","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.26edd749","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"541c7792e151d0276f92cf4aa34bbf4227c0ac0c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.26edd749.tgz","fileCount":9,"integrity":"sha512-c6s8bV5A7mIL+gFdZhShQcJHx6MIMqGx86soW61gETWChq4eF5GoHSviJyvDm0MxOSP9Bvkruqq9EudPIK6Ksw==","signatures":[{"sig":"MEUCIBfEoBwH9mr31e7LfaS1Vqh7k/NBhowEkaBBa27pG7dUAiEAplvKrxi28e3tVADA21JZxDUoS1XO1d8oFTtzSqPkXiM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM5cACRA9TVsSAnZWagAAcYwP/0xh1IMoE5WnZIZCmLZp\nhyW8eCxbPZlNuNbqN/y5ehKlFluYfw8Sfe22UwutH7oK3NbXlLauWjfXlo5W\nk2S1EELuCWmJjgYcDiSV6baYp61UXneMXAGbn0hopL7nde4970M6JwBl4e9p\nLoZDZ6UTqv0nEWsULfrIculdqI75URp4TLArXpXAHxF71Fv/bxS9cs/mUYud\nLZuYdSzjYb5gOZxrKc54iA4MoT4XTcvvmlmvWfsU41aQVQv7cckoJSZGqQO1\nYOnM1ehkf1DS4Wsy1RrS0jxMUHMo/RFKDG++ip/UP0mH+8XhPTu6MDsL9cgh\nudVCswgd7+45BVP/cDP1WJ9hyLkGZQTJumRRk46AfgVB2FO14PVVYEAC6eLx\n7nDqSZPXXF8Aqw5RzA6l0pY6/FkyIAEOwJe8FjB29egLCg7AfRJHjz3o89zY\nzdDsJgmWLgIiOOgt5Dv1sY0YLOg/ct1dPFVPheXMXHYEKjPWTTm9EolWZUHC\n/WlXT7U8cqdB3CsGQf8D+VoTqf7kehwxgrK2JhDdOHA8LiyMuojZFsuNZ6hf\nCPOewj+pskC0/Unw+Rtv4udV6++DBB79yAp2kzbeMb6z22Io1+wvGqCuE76T\ngZ2ibRB4FLwz80pBE1eYNIvumV5v5yCbTz5Fo/ZpbtdfrtifL2BenfUs6Cqi\nPiPw\r\n=goCq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.26edd749_1530107648456_0.9837057849206445","host":"s3://npm-registry-packages"}},"1.7.0-alpha.bdb7c09a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.bdb7c09a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.bdb7c09a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"0d0be882b03ae41701fcbaeda5bb1a43d13d0f47","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.bdb7c09a.tgz","fileCount":9,"integrity":"sha512-wVV+vQOzv2KGH52G6NKNBGbeBBbNp8AISWJzwRZeWmwJUtgwtKL+QfrT10vgyyRTZdKVlcNULYl/FN8w/CtRtg==","signatures":[{"sig":"MEUCIFdd+pjbkWSjo8O1OLubMat4N77XsopeRFVWltBaodNpAiEApr88Gxwsz9vP2hgtPa5ncVijq0WQwatn/obM332xyBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbM6tECRA9TVsSAnZWagAASUwP/2jOZ4auZmtbRaNQvHC9\n//ZnQhd7bPZrIerBhYFijBWzbmKBmd7VnZm6fldqbGF3G+jMGrDDKpDA1l/7\nM7fvu2Z047hda/33isem5jzOtoZDU/5u0xji8r3jpJa7uSaJVa+Pc3uWLlrR\ncCYmSla2qk66e0VtydWXPF41beCe1Meli/qgH0a1HXq5r36p13fk5WRj1nqn\nWFHN6TUWcSFP0fud+BRRfLO0uRtOGitc0pEfbGHYzdCIqwpOK1pG+3N/aoDB\nSu43PY+BKUvICkPIUPnjdY9O53fs12BtRlSkROcv3IAzREqtm+pGWJCuJNr9\nIBuO9y1qMYShBLhF6bZ5uO58KS34vzFc65/uBLM0T8422LyHSG3VHtIwsx1v\nAM+ViZChUZwbbP0NCcHuxFAXfPb31hC9CWCDQq89h7Kw5eTU1wAwsBvVHdjo\nBF4PE/GwQMSrbM3IF7zYTeoIzubSGNzekG4GO+trywK8Dlt8cszjF62gvPye\n5MG8DIk30wr7ppKSbs8ux2Vsyx6ZkRg5WzQoNDb5ZmUfM+rYQJE8Q4vjfe/R\nmzSbJ185107xK/kzpF4GZLCSqyd/RMhab0FT6UC4lQH615ywLVEles6qXDqq\n+36/L/A+wWMc24RQTS5hkHTns3yzt8sYZrNrHR3Gf7eyXpxr1FuEOKhyBtzi\nU/XX\r\n=9jYd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.bdb7c09a_1530112836622_0.6016499607930401","host":"s3://npm-registry-packages"}},"1.7.0-alpha.4f94f667":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.4f94f667","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.4f94f667","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"177f3c4a2d71cd7074450cea1785baca20295e41","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.4f94f667.tgz","fileCount":9,"integrity":"sha512-LNvCykHwtv5DfNzkiuD5hpouz1OoLoYKopoAoww1mOF8vLbPXLW9UjwL2pNwjuOwAhQwnC33f20tVTC+/THccg==","signatures":[{"sig":"MEQCIDBrTnmVlCJU6SN7YnGRZLrc2Knvm+0MCWq15QRQfvBGAiAnWD4Hn3TdNyFXX56YQ7icZ1psPEZy/VUKe/IRQO4jAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbP36uCRA9TVsSAnZWagAALysP/j43oOl2tedswrFcvPrK\nKz5+nEMtusvyDwsj7aQeLFsZUbIemMCWckMFUY2KbXxybzjX653Yed6z1271\n0UonvBL7ZszoBkaUT4iYlBFnk68yCZaEiJskCgdMi37Oa5F6KJTbubgtSoyo\n0INfZwVcLuL0+WthOotCXfAR4YAMjnG8qz9tRaS+OiYm05P4q3B9O+oClYpd\nn6+I7OFB9kFbnNXl9Dd+f6KmRFth5OZnWxpw6Tmu6fRebxwMOwBwlI0c/BLa\nS5HykyXL2lvHSaztdsnE0jsL9Ml77FAUcWsKMa8/Zcndh/Fmf19qVk8CY0sj\ngnnJj6u2Om+cHwR2frEiGhJ8l5Fqh+nW8ddKIdaRTIm7mgHjIz78flYevMBw\nglE5ydReZ8wV+sJunrwcnwF6zC6MGCcpUIgb5DKJzFsKKTRdAQcAqYUrtAck\n/pSLa4el9oHe2o8kJAZduxIMfUbdKX9XvJ3p5GYwxkilpAoQIZuLBPIuVG+o\nECNoq18ak8QoLebCKzMruBJsJ6fxo5sg+4T9NaYlrDHbXVROizqGkcEZNAUE\npPLizq67Xt+xlDmkvhA5ec/f9SsAnV4KZrBa+7VySaFdS3LiqiNtOT5YLuDl\nK+pt7dryfADW045MEdtrGLXbzTWAd6YVxVsBAhXnm5CWaa+MvQDixTJ/jsFH\n6+t1\r\n=VqB9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.4f94f667_1530887854325_0.6787797992527853","host":"s3://npm-registry-packages"}},"1.7.0-alpha.4bc5eb73":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.4bc5eb73","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.4bc5eb73","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"690bac04f037003780a35bbacfb839c288748d32","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.4bc5eb73.tgz","fileCount":9,"integrity":"sha512-TB3c4d6O7bvX1bmrkFTsgLa47RVNflvC65iVNMyF6jpLoqZEXTv4q6QWa9Lak7axJObIXWe/7sKtvHXg0l5ukw==","signatures":[{"sig":"MEUCIDU73PC3wBW52mGgXKcufCn2/d6/kZOzleBCy2GMwrcgAiEA3NfaTJxs6dIJK5m1eBxwP/bhFoYOu4dO/bq7EFwyRaM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbQ23ACRA9TVsSAnZWagAARYAP/j1E3YkwX/3Dt5Z1GLSq\ngZFDADyAGDjqVk3ZdRI6gpTHMLHdZvt+9NQABityja7/UuTL1kGvkzkSgWNS\nHV4jWahDA6tt2IkBSepiP28Tql3jQU/qXVxAdw1WoUi6CCpb8eMEEfncz5W7\nIp76qRNNnw8yL8LIuENRsRbck28o/OWtioDZYsdk3oK/CQXwfLZ1C4mLh2do\nAaqt32j3wM0R0NPv1erdG1Mh5JzJLl1+m/pKajDBPZTueWEnF34Zea5bj0yn\nKPr5HbVT1lbkRomuTnjE4Hp/jX0C/3VkIJ9MYGVAjCd3sQAVOcvA7LRF3PfY\n92rVzzEhnRdWJITl+j2BCDnugU10to5FXXBqcBfm7HY+Z4rs/krpmg9pTxCF\nF9cW526mVd7zra578U7m9LfbYSxzCkMU1/l41gkKsdSUvh+ZE5B/ZlptEjz5\nxuzzbTokVKqd9IRFczJvDhcEkrXmCtbNkynEGv2NqOQweYlplXRCDJxGQ5oV\nXMnqc18oj4PmDOo9Epwih0qfU9iVowq2Ej+MEcpZXM0e3OoxQsRcv96pMon6\n89b72ac+/jiWZIWNguVSRk0boqTyFconYu22etanxdDpvZ1GY9ZdcxhqhCT2\n5+cQUm87amAuVgdoigmBV9uPbMUMrzZ3nolD+mUAx3eVZfS4vnMinUrAoKRY\ngzjE\r\n=7cFC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.4bc5eb73_1531145664043_0.48046160686287553","host":"s3://npm-registry-packages"}},"1.7.0-alpha.47a1bbcc":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.47a1bbcc","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.47a1bbcc","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"9ff180898040b5a107c7aa52cf699640baf6feb0","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.47a1bbcc.tgz","fileCount":9,"integrity":"sha512-bfezmXkkTtlypFIPGzOvnKPUq9nTq01FDYbDvvYZfLEyg6UC2gVVCa6ad6pWmNL8lSb93X6X3clvKopZQf4i3w==","signatures":[{"sig":"MEYCIQCTHQ+Htq9BgyGEEVyKcBININeVKgQHb62bPEU62X3G7AIhAOO60T7KHGtc2WMV3hJEY2yEoBDs2vVT9XWYs3I85rkK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbQ28UCRA9TVsSAnZWagAAEp0QAJlKLLrkCSAPOUuLYhu4\n+PrZ3yvRiIBNGgxnEaRT3WFZKxWGXJbw2VGTcTqWKuRreUZqKUxRjZuivo+y\npkErOenZB50G4+KX97zLEObQiT+JSdWZTiM1EvxgFymeOwY+IAn5kZj/LpFu\nMkY9JCkHdbL2hLkTNuPXmyUZ8zB3lQo6e4KB/l1Z8efc5rB6KkvLplK+qxMe\nt7MLRBnAQyShJQYq3wMMZ9AH6mlFU2nVps7Vpk0uKhzZguI0HosB5TWKvzVE\nvhxGsxRzmogf2cqm9l6Qk5dXVoofmB3N+UyIM9H1bQ9/1HMMJ91+PwZSDOUt\nls4ibmAi9+FNoJDHdpzRW9sW/FV1r0BpWUwfhdA7+whpsD+a7XbKlUexY6oL\njsqncHq8kpl/XfSm17RdojL7e6VNwsHYUv0QMTHvC9OxlVLbj+nGj+vlXbh3\nMz2QPWJ10xe+anqh46dGAa5hrVSsP2PtXesXBqIGFtkyqG+qXbyRv6W/a6Sg\n7k4tBoL1n/3xA5rd81r4TiTpwwVHuXjAdE8LDeVKqe01g3rqNnpFD3USF2Ks\nBPSqM9b4tFTdxRBJRZe0S3pbiBU/BRAgF4Qi+oZ4h4G6ztE+10s0BP300JkU\n4bge+jG5L32w8XUwjNKMLd0l/2bDmerEqfjR03oWCoq/IA9WPNEodazmtok0\n1Utr\r\n=nMOd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.47a1bbcc_1531146004613_0.8123783324391827","host":"s3://npm-registry-packages"}},"1.7.0-alpha.2527b1de":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.2527b1de","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.2527b1de","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"44f1292ae455dfc515d18fb4ad75697e5a158935","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.2527b1de.tgz","fileCount":9,"integrity":"sha512-EFintAfeo/wVsk172NAEPzhoNpp8ywurCfgPL+iHU9bgG3f3J5xcrXxc8YgEiQ5P5Ad+doR+PqgRRGa8ktpkEw==","signatures":[{"sig":"MEUCIQDwBPgu68Z6rvug3yaa1AJRNdNqK5NQF78ok7tZQbwLyAIgJ1KANN3jaqRB9EQoeINaYi8oz4iiC2RTAlIoWOsJHoM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbQ3KgCRA9TVsSAnZWagAA93MP/36dsSyQRB/oL1UYkvoP\nWcq1S1D3Fc+ELW2oHOLoceVRnLs/DBTdhecv4AL/AqhjK6sTfrAygHx6CuGy\n30XRQbgsY5TBDhuoOm/Fo+oI7FPA+OVJM2kfUGpAEiwWE5IpnDLExnCW2hYl\nXXt+ZXlX6r/8xyb/wE2kxsA0FTa/biXAw6eEfv7p7C1YPO3+Q5FHYy6WhLN7\noL6mC418sKzZCH+togB3JRLcos2zXWteVpzGLVurmhZok6KyMsLU/7yfMuAM\nT7H45w2q9zQrWp2sBTRS64mAG3RIN9FtKw9wZNoa906Het8f1ed9UbQw6Ye8\nu8S533ecrYBgC+fCH5Qi6ff0fk2uo3ZZMvPQmVoUQl4rIvSF3cTpHBoxSxIr\nq+JZDG3G8WrOKGNaMtdo1Q+mW7R8eAGLLifN6garE4hQUsqWaMpNg+OWKdZB\nNoTxB4SoUzEPdwSr9uQMPCxeC/S/qJSvXkSC5b0vI0KvGGeKUENQNE/k3Z+J\nsO+u4AhdQ+ky78k3x0sVFFkhRxMruNFr3zRnlPXBeQ3BXOSSj1nI9m6x1yKY\n7aWteO+ipaCC+nJkH88d73cGJfo4scrGYN0gNdRBHo6KXgU31gRs6fOWdVci\n4THk+bZuHKxtE0qkkpj1mcSHbYbdWO6rhX0ZgnTNYtTytBWx6n3y6wc5Gp62\nI8qP\r\n=Tn8p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.2527b1de_1531146912493_0.05296650249237311","host":"s3://npm-registry-packages"}},"1.7.0-alpha.6123c2e6":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.6123c2e6","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.6123c2e6","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"719b016f714abcf968a262b1d96e03b36acb6362","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.6123c2e6.tgz","fileCount":9,"integrity":"sha512-jGtOemDN6Mu4owoJFZ/zV0WdA7P7TKWxTWytEoOcVrUStNOMzc5yFVAS7PzZgpcvkNae9LKKbPNd2/FYLmSE+A==","signatures":[{"sig":"MEUCIEdF84RoX3wYUQHyzmfBssD9DhjkYXfRFmjkLoAY7aTwAiEA8yekVJ5m60Q1gbAtBY2zmV7AUWdTgP06mRorNJBWpk4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbQ3QPCRA9TVsSAnZWagAA2mkP/2RVC8ZnwIys7OOFGBKP\nDY9tf/aKcSwa1vmFcMPxH3RhPTH4ZzTqhUJ/t7OcKKaElQA1kNpMhS0GaqUn\nA1eTErdJ3KVKXsTNrxIdJly8ej640C2uy9Gaq0Ip3ojKKjdPGS8OmLAugiMZ\nwfdpIfMYERgMwfwiDoyMzjAvpeuefebeOwoQ5PJZCSYm+IXOoGR3tywblooR\nwBnAgKUPBYUckyw12tqIe8mF7DEp2IyCAvdc95TnJP+RfFvm0/jAILOWpT0p\nBCTf2jHkdlIZonmB9+Ra4vCQUq+HaFpe7nQJj8s/JtWTO8SOf8+70gHgXzYx\nBp024sJftgkWXMzb54X7zr97awV8fztwERJTWXApdeZn35bf6+t/6DrMjsiO\n1gZDMJ5UwNDFznqsmM8bd7Gn4diLRveKlJlLaIzeM1RUkyaCSJcnslwI/kzY\n9i/k1hUxgsQUiCfZ/nOF0o+VmAQcsQg3PQSg0NDoM0jLpj9S8ABvcBYOV0ht\niygxUGxYP6M7YGo27QhwH0312hPcCUnbAHZyWWhj8Y96xt57twiTSt2MgrgU\nYX99z2sqXceqdOGMCJcqyJQDNZLEeSf5HdiVJSUX7nKqvne0Yi6jsN2nJf+7\nH5dmodKrsg8sv2K4AFvEYse7UGQGimYaqC+2a/kJiKqFRhR8GUyMcs2yk1SF\nB06q\r\n=x5EJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.6123c2e6_1531147279192_0.8399079913969931","host":"s3://npm-registry-packages"}},"1.7.0-alpha.c9b46a18":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.c9b46a18","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.c9b46a18","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7f18354f2d1a6c14d6b3692f5f13c36fbf908e31","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.c9b46a18.tgz","fileCount":9,"integrity":"sha512-PfR1DW93qIN27GSnAYgQwoFLHfHMjicXg1DumwlHaV8I+d3N4Mqm/taQVCFYFv17neot2k18pVlDh7CTP5PSNA==","signatures":[{"sig":"MEUCIQCH6zudIj8fOc9WlbRQq9PwOv1jC3Vwo8HBbj2B9ovwIgIgaxKU2AO66MOuUaNQBfT8OIoP8lIyqM7qvcX5GMFz0M4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVwLrCRA9TVsSAnZWagAAbUAP/A5/uc7i39jxShEhEE/c\nql7w2TfMqwVsA2gxc4qkyVfP4Netabh5QSbuZK90RiomlaFDtO04ZPVio7bM\nitZZR6cZ+4YTqV13sTgcurKYDDCSWO3m8L3kHWWgUUAKQvpk4aZo7EPYNsVd\npZAzVwOHHUp6iMHxLvujgm5s1otc5X8Qn1hz6NKCnE/G5QEKLEOFkfvuMBh/\nTCs54d7+CRJSCR0TdK3Wkm9kfKri9DkQ/ps1orjjlE3ov8m/OvzMUHzRdyrw\nsj6L86XMoFtNkWwz8EXyD3I43Kh/prDK7cvkqwSZj1FMo6678lwTZrAaCpi2\nYAkvXEZpNQVypuiISa0ewkUQSzthMBG/s3uPLzZkrZto+jQVzP6VNTa+iAWp\noZbZ9CK2W2S5GAn70nPNAqn0tRe3x6zcQuR/MDil+7teZnAKdn+vNKyrdjTj\nACqSdQ/H1AGmo4w3GgmxgcBRxuta7Potzb1HRFxaQLh2t1DzkMCN1pX7D+sz\n/PG+LBcArj7hjYdYfhSl0bGSrIOgYbzX54OZ57eXYtmwpfXhwCHmgg8eqFgc\nldSYM3pUWetSG+ld18f9KqZ8l9b+o8WuEbgO4i+DIhRsgyrQYhDmjZCPA0Ic\njhzOmc//D7gXqPQ6wkyCh2FkyyoPDQc8BgriUU9laUtXaf9JGaQ1kAziTmx3\n9B7x\r\n=6vHk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.2.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.c9b46a18_1532429035742_0.6366196301229523","host":"s3://npm-registry-packages"}},"1.7.0-alpha.46b24380":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.46b24380","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.46b24380","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7b32b7bce76832d225f36ca43d30b517a3ff77c6","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.46b24380.tgz","fileCount":9,"integrity":"sha512-csAEa+GNAN8ceV44yNVNgLFZY1GynSa2iw0Tuup8eBaWTNCZCiMLvDLnbwkxykGsc11ig657EoQFWEndv4e4Qg==","signatures":[{"sig":"MEUCIDPHl5duAowGoSAkB1Gt0YLvqLyR4MEDXGvH1Tt3zouuAiEAo+cA2m+nDF1ya9IhFgz+USROoMhoNV1tr5oja7JkH9Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVwwPCRA9TVsSAnZWagAA7YwP/Apo03NGtc8TEVzQkkXB\npWs2zpXM2qtU70QinPUnNou25Xc+zP/6HYGD2ai6beQH8hQJGDAP4aqiN8mM\n+sJ8Ozwu0j9CHU0q2dCjaIyeAvqhJMVVHFfjMqT7AunPiugGXy3rh4tsyhQ/\nVR/XzqcHVPMWW1a7IE77a59sFQlOr5f4etReyJt3eqEOW738jWOj05n+TCcc\naoKZq6po4jkpQWjCqTJMtdUy0Ry3MC9wysF5sDPD6XQDwuK9J1t/Md74iDQf\nogsTSl+r040B7e5wOqC5Lhowp3v9OaGfICBhimMr9WUS2QdCWhAW8fjB3O+i\nDWxggy8JNxyTTolbjCgcnRi15CQCmxF37fC9HQji3JLHqGJbizUb+Bi6cmaT\nAceyqjwsnLjoWAhFJNySvQH15CzzVBx9U91RPOnHCtC3rGtXjJk8ZcYYTvnk\nGhJlQC8B9n3/2LeIteKDO8wYj0OK9cSCmTE0J4CDGMARVUeNYkA4zB3QWoho\nvhGaHrhEQ/dtx1hmRplE3g2CoF1xsMh1s/Txzzo3wv/R/AEe5RbdBBhJQ91s\nl7/AlcCom/PMQOvfg/SrL87ZS+EnYvwxlRQRRDlg9M8MqKOtULexPUBeeg20\nUekqLRhhQs8UOBU0xLiuCqCQwRrkCfG3L8HKVe4iyS7Iy3Kd0iPyr2rxOCMQ\nC50+\r\n=KnCC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.2.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.46b24380_1532431375046_0.9908499777562958","host":"s3://npm-registry-packages"}},"1.7.0-alpha.1b206c1c":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.1b206c1c","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.1b206c1c","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"73fc293de65dc3cb32814315d4f62c854219c8d7","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.1b206c1c.tgz","fileCount":9,"integrity":"sha512-VH/shBzkvl1t8sLvyI3DveiJQBDnpNLm8ulkVlPVMtN6cmbH0TnWt6NOUcBfnbdLUtrMsaaVO36FUS8lUaVQnA==","signatures":[{"sig":"MEUCIAkJVj58+TADA1Ab24GcqqOAXVHX7ucEqNIdML5aB73xAiEArt1dDhfM44BkoF3Nk1YNxg9jPIFl9OTYDGHG3mewDb4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbVzI5CRA9TVsSAnZWagAA9e8P/Ayv62U/5drrnY2Hs069\nyXFynEiPqPI9jGUvg8pPcND18J0MDvTlthOxzLCb0wcLYU7ejaptn3LgWg4f\nFwF2ocV7fN3vH38f9J9bPcxGuMdEWX8lj/mGCbvKUwC4mecTD5PJK7lqqAY2\nkmPPIfOxwgU9pIJG/4YQTDt1WX+se3giJxy1FJjSe3cIVI0fKeN/tj/HbqI3\n37hBcJGygn8DTLggBRFVbnVv39lklEsrV9sLceObkzpJRUUSt94Kodlc5u9q\nLSrrVXCtf79WYX08jFtDulOtyG8HpjXmGxuMahENfRxZ0Sep71Kb0x/zXV5U\n+APGkxT+azOCNSTUlv7K9Izrw+VpnkD1sktTl8APjCHCVCA98pjpmNpaWCMG\nR2TNaMfMdCM+cQMnDweVN6dqx4oo8ZPMU+0JpHCTPNWn4BKThKJzrFk2hWnK\nHsUlRNC+RbNrt8HabRCldthhlNHIKnYv7gnRXlqVa8JO2KI2e9RYzdDJGAcj\n3WWRIEItNNHVG+tRWyDS5FvGKEE6HYBnOnCu46x7moyG2S39Tp2TUvKaayYy\n+Z2eVGUvN6Uy4fz5N3oR2Oki9JjlVDxM2JJAi5cMg0XrITLiVsRUx9g3bQYt\nyfvp7RwcI+z2MkYv9ABpwQ7g1GK6jYiJmLSeFQkKgcSuHqQQYbXaL0N4VVll\n94rU\r\n=Wp1q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.2.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.1b206c1c_1532441145729_0.49067610021335106","host":"s3://npm-registry-packages"}},"1.7.0-alpha.7dffbece":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.7dffbece","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.7dffbece","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"9cf2ee98ed2d8036e3b8297fa5aa79166c1c15b6","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.7dffbece.tgz","fileCount":9,"integrity":"sha512-4Iwj+8aDEDPq7WB2iclFwuySggqxeMtsad9UndFWQxK/OsMcpG7S2feYAKCuaVX+TMMW5e7DOL68JX1d9MCnjg==","signatures":[{"sig":"MEUCIC39eCXXh3EY8qTKX1iGcFWiVpkZeRtzJGCVjfWFtEnOAiEAlVoankIES0voL8YbNDi0MfEf0wpAGXNiJFLJgyYlPfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYCvGCRA9TVsSAnZWagAAbWcP/2fVzH/uuliH9NNx3Tky\nOoua6bTh0W2fdGWBeCJPci64PLbDQB1BCu78UqDBE+IPgFXWgLssxN80LB6U\nyX/nU2EH8nKZhfldaxbEnYDza9xUyxcUX8IjH26A++Bb3SiANN2aSHlyA7od\niEHw86zHhAUqVEACsy30nkcecnmecai+07l6Hu4LoeesYsatp50vEyAwIzd2\nDAg6jGKWPvWtRNUgfrevcx77+N2+YHO8GHlAWtX1q3grxKSqilKyqOUVBQ4c\nS50FQ3ZifAeQacA6SJgGHrep2CLLasEm/slHz6zPlDv5HLbuR63ZAt8n5yqM\nQhT6c8I4QkWhFV2lUiTPdmdh2WDJmkHK35tbguU2KpYrWFncb/DHYchq8lXA\nVYDVgkFbjYJG4RYqhgvgXoVnSYigmxV0IjyNYn8hbyrheMh71PbgFPKzIzJl\nxgUXPi6bVEscwL0YFCIHTbxwhi2Ruga8AwBvPBLvqsVeUrELA93RhCxWMYPI\n7cR+nIY1OSkb7+x1Hm5mrnOadcRTT+pDInaaki8GD/jPDUmhg0MZB6AkCVj0\nJKnvPB5AsE9FBb3YMLQlik5MZTA6yzXmcRy56GA3r2s86sUDkEAnLpxj2doA\nmzu8Tk0Am4DXXGiH87xKhxk7rBzGTeh9sPO42nYdwNQkksZxVH7aEG52/2QH\nwDui\r\n=BWLb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.7dffbece_1533029317714_0.5870488518063353","host":"s3://npm-registry-packages"}},"1.7.0-alpha.b99fe740":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.b99fe740","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.b99fe740","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"48052cc005ebf881f6abc7f20d57ad2264724df3","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.b99fe740.tgz","fileCount":9,"integrity":"sha512-o7+cGLsrbqWRlgqiV8BESeifnEXmcjrf7xwQMImeasE3KEKJXx60d3NCzSoKP/77pkxgbPf6+PUoXu8C0Wkg/g==","signatures":[{"sig":"MEUCIQDZDxsLtdpkZF3w72wykGMFGIa9DuRZUDo5ElHAjRo6PwIgCM7Yac5cjqBm4vvPXB06IkYtio0borykDWQV0/+oG80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYHjJCRA9TVsSAnZWagAAVtoP/jfE8mq6yVQc9WTRP9zG\nMJJTYR3phL9M1/x3qxQzheWXQtD1wIZjtUj8FveYRI9CU9+HAoSDD90IsyfQ\nic0ltPwHS1QpQXFklYEhNu/fQNc9iVURn6UxgHG9aoBIlfGGiyw9j9JtxUYP\ndjUiceQmJb+yOat6opAFmtKEAJhwGcH4nVSIOMf0MI5+5CPP5hyCempINNT5\nnnAPKDPd4YV2g29sR2hR8+bZqbmllv/567frDPRX5pRH3B1qVgNE9VYLCM8g\njjGQq/LyH8s0pCO2a2i2n2klxzf2yPHgi6SPBbzumQk3GXu/RpnLoLWSqlyY\ncYS1UU0MHN5LaQNs5wFQhA3AgOb3s75++1tC1IpusCu4YEl6nSiIRA9POZOU\npWmKrYIGSvwj4Z5/1poNmDT36zVN/rVs8SLNSJp81oRpOELQqfbTWb5vDWGS\n99EVoTWQWJWvGPN3gA0rfLawUfAC6hwvxRL7ihdnImUWHdrSrPIKzwptocz1\nSE2dF/jqg/RKSkfbw0MnjnLhZsY1hgoKJxS7atnmUssNdFsaOdsFy3dn8/6B\n8g41EpX/9yo3uF4urU1uotmDKrLiZVXHghKJZTwucTslrDF/KlRK9+L4J9wH\n5JMKA/YtCSxiDVpdFD/zWYAE+wM6TiuSAG+NZrC7R9ulXzf36yLCo1wyMnI+\nRf+B\r\n=1OyK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.b99fe740_1533049033207_0.41947146722920436","host":"s3://npm-registry-packages"}},"1.7.0-alpha.f79b8d3e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.f79b8d3e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.f79b8d3e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"2c0468487c70d9470be181e5333fb246c1c756ee","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.f79b8d3e.tgz","fileCount":9,"integrity":"sha512-YYAJpQgeepmie+29c4a9feMQeok9I0h/rzx777ICjDbPbC7S/wwH91dPLgqa9D/lewU4xI51qiTm37UnYFetvA==","signatures":[{"sig":"MEYCIQC6oCzVOBZ2tAIIQUpN4EcVeqtw+d0MfB+NUdCqgP46TwIhAJgCEmfPKID9TFXpn4gRwCndReYEDs4/600rImHjmHqh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYcfgCRA9TVsSAnZWagAAxXoP+wWrV8Xz/9kd+MPrVVTv\n8jLiqk4OSquCxwbaeqhL/ySezEJZKMyvKNtWKuCNHteFuhSSSkvS5ARxEVTz\ndk0Wldr7nCo+PZ1/eyWo55YK5J6jhwix4UNDWxSxKAbBqV14h+D2GhULoHMF\nvBI6uj75HoAGcukLkJguNr0oHXWKbAosAuDhADzsR6YsIQMnNx7b5NFZVu8V\nSRt/3Hpb61Yn8G8MACD+vP5kltMf+Y6g6bwFR+/A3wOq5oYsSL0FndZ/8O3K\nhk2veF6FruQ0t8+wi6VyZ0L/V2JeofIANKDwqFxHH/6tdoM/iKkyCNCbGMwt\n5qKi+PsvQn8Jz4Wokj4FUwsOENoEYXcPcf+J7R1/8eQ/9T++z+1WIE25EDo+\noyft7vKP5aAEDq95bq1GZSFxcEd1mIizOhWAXLPlvViSDpr/orTyxaMrXyCS\n+rutAKvH8RFCFPq4uChWrwujGaTJfwXsoancPyKe+wFIFKRIy8o16YRxAhu4\ndQ2T5jamwQT0icoG24Sbq4XgkpXa7RmPyAS3LZvxlLtzUhAUr1uYDhD/KPv7\nvx2iWNjXmILi/NblbRdmYV6YVSgHDq0coFQYJc1/j00AfIhF5Hd0wcOfCJ9m\nEICoft9NIxFd0Ufu38UM6ZEDxyXbt97gLZ3QU0arB6rA+f5mY2UgTSE77FNU\nvdFT\r\n=k78E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.f79b8d3e_1533134816208_0.7327239408537871","host":"s3://npm-registry-packages"}},"1.7.0-alpha.0c0b945f":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.0c0b945f","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.0c0b945f","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"64537f1ab9a985d5a9d8e559f26283a238d5fd48","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.0c0b945f.tgz","fileCount":9,"integrity":"sha512-VCzbgV3Dg+61BCSY3xAOWMwCIQNeXvGZrJLJNy32ZpLLwbe+INNUCYFWKDDryvQFXZbme4USDbTM6BVkAUjcfA==","signatures":[{"sig":"MEYCIQCTiERL4oa8+v8XUHL5y81NFI7hK7boXHoaFcTsHe8Z5AIhAL0JiQBEtO2G7TMP34wIyWH6OizWmCnrG/Cd2QsZi+Ag","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYcrJCRA9TVsSAnZWagAA6QgP/2WxNF3RKJiXdkOFmW2W\neM5uiVvNXUM2ZtuITQEmXli60Hs5MDPEKO5t/weJWfpGJg+6aIVMX11aRJid\nRVQRd7nxHUdLDLelInJmNFy9YN7f5ACsoiIwLjwUMhmewWsBnUu2QirDJKm3\nmUN3X6W8iHaWpLnz3iP/agxdE/NaBPqqVZH2jG9oXLrOoIIMccoLAiR00nLy\nZmIRmE4JrjIAG7kpF8L4Nvv2tLDuHKUpOEGs0e/DtmTAo5j1PclsTVPuTg6x\nDmKKCIVK4BGpbnIE4nFZpRocrGW6kBA1xIGfykGC7ImIRz+HTbu8Eqnq0jiN\nbEk5t6eEDChvDzhLHyRHZVhgjp1ZUyT4EdiAZFAksn5o74TfHekxlEI/Bd50\nmamdqIWoj3aOYF+aOBlIY6K07qmE7z3yAmlPfxijSE9/oUBAcSATRG7yopeQ\nOEmBWO2UlP5pOuioMV6PoCTt5Hi3inmWTAOL2bgZ9n5kh9M6ICC2jU1dzLXb\nILm+Zo2GHbrUrWzAPMavizLlvbkiH9+Oe7szc/CwxcAZqu9hZ79PmFuLsXgr\nIdyPz9+qxO3E51H484qAmPdJ5ZHRWvqCbAQNkB8eCz7XLSNE81OWAo8HCM2l\nTXNgln2QWTWmcGw7IgQTsScixO3X76KgoKcGjE/X6MMhQrLC3Qmihx/qzJg+\nslxD\r\n=7tuW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.0c0b945f_1533135560900_0.030291047340138544","host":"s3://npm-registry-packages"}},"1.7.0-alpha.b68aec03":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.b68aec03","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.b68aec03","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"5a90a17d9b190d2bdb2cf42cde134063c67801e6","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.b68aec03.tgz","fileCount":9,"integrity":"sha512-6rPYJp0FJSCqfVP+eYpWlR7EmjqMuLpAZVgbIK2d8kc6QdDy8nSOzxpP+hPP901dlV/4UJfqNpmz3kflfpUYuQ==","signatures":[{"sig":"MEUCIQDjqjtq8/6XtkVjoJ4jLsWac9P2OY6o5HvU6EEN4nB46gIgIFs/3x+4L32QuF9zTzf20JpkC6r/UqXZ8nQ564poD7k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYsEGCRA9TVsSAnZWagAAT0gQAJZACbTdj5/75ImqE7/u\nIc5dTJHhQDT1kJ+rKOoYzKXeu9jbaJmzVWlMnqDtbbnI1llFFRIqWIdsfDch\nQmol8ChzZe1t1Ca0Kt0n92yv+dA28hwEBbUVInOE5TxiqfIefTaM2T4zqKdM\n3qJX7IQpUm7J5HZ0fmTLxPDDkLYyX7iNUijrSwsQzenksS+nkg4SwJlxP1XA\nLe07gf5nfuHGCqbCUAxE4ij/hjLvz+g+tSYLWS2smAykHL1d7++37hcle6+4\n5LBQBvMQySHYF5pidNbAadbZ5uezSyzTWa3JsRIEfZ/IZVnWfcnRBXYeuOUP\nsdEd/NH9mi9WOPmvTx5fvcemxPadbUqSaMDcEDIXIGzybLdWh/RUm4MMx2vS\n/0po8bQG+x1zMwg+rKoNs2nE9fWFur4RWQz7OgNnK534o1vWomb/tqM7bSXk\n+bPzljo1mO0KHM19P0UKdnhnU8OvITuKddZtaA9FtanA1JS9eVPt7rKU7GlK\nbx6JaUhrDylvI0xGuNmCndSfKA5OXdowLbpVJJV0w3TvnrONXPvUIN2npc/V\nK+U5vdqKJYNLQgt0WPSo4uzWgzk0vTfd9IwS6dq8hQWS/s0nWT1ZE+cp2d7N\nFJ0Pe29Jy59IGFjKjynmpf8VnzVJSEs9mCsXXF8Bg+FFUNxyZrfX3MjDt8JQ\nWa9u\r\n=sNwb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.2.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.b68aec03_1533198597828_0.6364591132218536","host":"s3://npm-registry-packages"}},"1.7.0-alpha.328d5350":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.328d5350","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.328d5350","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"a9ffea7eef93a8a49d8ca1e71b11b2161d65132a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.328d5350.tgz","fileCount":9,"integrity":"sha512-49XrbpzVk27+c3ZXANVYCJfRxa4Gc6D9VrxOgNawbCBtSUhwUyJ4OzWzgpVqkw8fZ6HrYX5tu6cnJmANBJ1zJw==","signatures":[{"sig":"MEQCIAXIfsqyJ0XJPXYsIixgC9UIpXr5/Na+XHxQQZZOGZNgAiA6UXU7Cki3RCDiLv06ykXfO3SpY5k3G4Bul6C8ktHb8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcq97CRA9TVsSAnZWagAAHaAP/Rpfr809uIsvB7+ba95K\n69zRbJRCp5Duxj2zEKQlzFo9AaF1hxkO9Eks+w4Gl6sdONto6iZ0SEQWfRHc\nK1Jw7PyssOX9KFAbFHOrAXGyCLOSMet+kgaV18rGHHtaHHiWgKr7rfpis5uJ\n9pqNnH8DE0VlhsxBg6Sq6ck3ubAydd6/ApHnwmmH2wreRfkFOCLM9kxNlgVH\no1yKlpBXDCjs/YGIL0C2ZwCwIgEk9qsAcFgdhfPvSPMw+953a9uCfIndWVyw\nJtXSdh1lpmHoRXjvm9A6CwL40XninDd1vlhVhE7U52/k/j1s5/nnP/J+0tLC\nVDB1b5FPd4sTY7cjDKXu6SOMvBwdzE4t0yOPLOtew9QOset7R6BbmLIatpUX\nqqmh3rmM5HcyQ41h+iB2sTwyjPlidsdrBlOcOJrM1MROw1+63Opej08swCEs\nFqWcqM/1leqVUzkXxxJQLeJlUElmkvwZEeBEOOVeMw8SGOBU3d4tzTy1A9zA\nQyEeSztgR9hFdrUbOe1GuVRAlTz/gxsDog2u4wPjxHRpdkEFPl5TeGG0XrA5\n5zpoXaShD/XExDB829GNkCtu5JELI4X1YGIAr4+38+tPhkCORPljb0c1CMHg\niFIxTjluoK5yPuj3szw3oYypYV3UaWVel8x42/+SDgkdYHwkPCr87J9rTIi0\nDgxr\r\n=dLa2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.328d5350_1534242683338_0.018883401610588546","host":"s3://npm-registry-packages"}},"1.7.0-alpha.5f6f80ad":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.5f6f80ad","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.5f6f80ad","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"04cb0bf285d17cd39609fc2260b34371701a48f6","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.5f6f80ad.tgz","fileCount":9,"integrity":"sha512-Pj0MsWMex5hRN0Lv8VIevAIOXThnmAo925GV1H74f9GDIeQGAMjtWVoIyUnYxfbPDpsCrMWWZREc1qt+sjcDeA==","signatures":[{"sig":"MEUCIQDQqqSAbZrafwJlguPzkcDsfkyNNUdqoLsJ9slg4A+gcQIgMKhhtvqKoyC135opt1jUcVSXBGnnO7NrlGvpOUe3/n0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbcrFmCRA9TVsSAnZWagAA9CMP/A5IXAnCDNBsE4qdLGe3\npmaXbiqZhNQ1+sxnrh43ZGIxZYpPq4w3lMRqZ9yVAgOxoOUPxV511LlXWAvJ\nP295i2GuXraMchk9xmcOVZtZWOG26O/KLhgbiE0AT22AZWfdggenr0f2kevf\n9X/7Oq4/BSW99Wgi//yDxolcGWmfTgzh6ECt4FtkkUW55a6RZuSYs0mTfns2\nlpomGT6fL3YLiPfzKCTgJ3ibOHDVU5PpwrRYSyaLO+5noVIdHK8TUYcB6+qF\niM+AtbDmoi2iGh/kioy2+pRDFSsQMQeM+1sJckLO8glIg7NPFOq3anGIloM9\nbNASvMDwLkdnO+/Cpv/9OiBq9irEh0EjOT/i5Kt8c8KzJ7PXRLS1mn32anbm\nnh7TcyOKjHuKFH7EJiv37fbXrw4TeGYFynXDqlCyX/5X4kSSQI+1Y/iwS818\nr6S63F6KfMpY8GUZQJr+HXaXWcMDn3C8SyugkGAkc4KkJF2tJu1eh1AUnp3s\nIGxRRmzeU4otosgVTkjdYD5kJspYhsD+UzdZm5GqASEH77Mume5/oWmpP19s\nDNMfeUBo5pCVd44etXjOa7PMzddpyGbN6qUXa4ogTj1b0O1b82nOu5wtDr5V\n3nTtq+usI9hm0FwLr3PsbbIARKRHZcOwj1MO4ZsdJrED1Jb5ItS5Prz8II6S\nnO5r\r\n=pIbK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.5f6f80ad_1534243174558_0.7993273778677581","host":"s3://npm-registry-packages"}},"1.7.0-alpha.78e4c0a5":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.78e4c0a5","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.78e4c0a5","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"4165e9b91c84108c4bd32772e176973b1591a183","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.78e4c0a5.tgz","fileCount":9,"integrity":"sha512-ATkcpcO1m5sFVl3bc2n+8dDzdNWl48AO+1qxjXPVhCRl17XpwlwqvC58vF88uihfnuJ80/8rFPwtiH9Hz6MYlA==","signatures":[{"sig":"MEQCIB/lmJ9WCo3inIQ2kzqbyoMBhQiZFAyL0FEbm4PV6ILsAiBlK9oAYKJ1fOEGhCbP/IExoGWUpM5cDZWWXAylq/dIGQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdEM5CRA9TVsSAnZWagAA1rgP/3/GYHjmrlIftNWMb4YH\nk5piWnyMqLfVpAcVx+TM+3vf2ZZLMVqA5b6PjUJCQNOShuYt0KTs+H9La5vQ\nbiXBu0Pbc0wAMU85i/mGARTGrhPKUSiUyyGS5EbE5bw5ChOvFLGn/qbFJ+3Q\n+o9GdzHmto1LBOkPZY8YsZDab40kU6eJOMzkrdeACt7Z5sIFasKOB/04Z3Ng\n2RzfIDpJv4Ils+r7Yuw4Xo0Q8eUENwioSsd6zaA48B8ytiPFCOj1Fwvg6G9b\ntTLv6zNkf50sU0/epPgvkggTCUcoG869NWk41GuwOMJfb0ihxawqdyr9U2FB\nfJtTMfPkhjElF3hMUuWDustHnAQRdiNAMyUGZ2Aep4s7Ru4n+4ZyoZcGCSgy\nt9XvR1hl0KZswd2CC5qdKveBm42j2UWNalOdxTKcPbcd89dr6TrEuRW0qP7a\nqSuqqfp7dSI2EwcgiMvX5suCUJJ9S6RBDs7j1hCWDUOYydHFyInFNeGImi6t\n3abC5Ksm6Hh48xppkQZgOykNzcC+RSDIIgekSOs+TQTOwE/a1jFCSbQgtN6O\nKdxH6raH9i758El79fJ5vTL24fLjKi6KYfRcrU6uEidXqMMYF5WthYsu/EXK\nPkADkW7JtbZBgMALjV1odBg4bnL9dVonOEEfow4q11AeHwbWAIIJT2PQ/d4d\nrdj/\r\n=5Zbw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.78e4c0a5_1534346041601_0.463495940175106","host":"s3://npm-registry-packages"}},"1.6.3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b2fd1fa60c96f611d9cc15a5fa73d5bf717606e7","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.3.tgz","fileCount":9,"integrity":"sha512-sD06J6BrwVnnv5JJpzquIGRZWgB2gqAC1qjRGqq2N09GT52Q13NNBGj3GStUj1jjCbRMTya03vmVggYQPDR0YQ==","signatures":[{"sig":"MEUCIQCVCB/W1Tta4U4wcgamfdcKYvPo8TQNd8EwaNqey4B/GwIgC9VDAUq8qvPE9W3q3WZBzF839oCmkBkjY6pbG3N/bM8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66312,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdqUFCRA9TVsSAnZWagAAvQ0P/R3Vvdw4YPvpFC1EXYxo\nfVJV8exJib6HLGCsE4dQCbtcgbIv7sH1KlvxwhWQqSvpq+8mF86kLdmj3it8\nvyqfexGAxZuWmrqtKspEpu+WkfEWQxSvwLsO8Zh7/mg3+Mpj4JVbPAUJutNs\nr4Cn8yotUSUJ8GUx/C5OgdDc4iwkFHF6BTenK4v/P07ccHiFzRWCcSffZf8C\nMbFZ2zRw6hGFqluzBm7cEQxMyJ2Z0cw0PDNXf01iJO6eOUxUjICt9NYpwb3H\nNuWfiU/a+JdAyPU62VCuZ0xFwy344I54wIBCgAKRB7OfeFDj+yoC7/qPUAH/\nj37Q/17W3LQjC2kxQl07KItW++ktrmOhp1XxqiFdulbwlTA8GRwfLIl4xN35\n1TgmCx/LRJfFdOdcntO95nyMNIDBV1oFXnWc4KfsH3B7PbD561fD6Xrz1sEu\nRv0d8YVdUm7JCYsmN6lAQ7IexhUpr/Sj90mpEXMvKZCifiOOT3BWISAX0Nze\ntVZsCbmcayqzhA4/ykl1WrX6R8H4w7exKbDmCt5YdlywQEGtCzUYMxMBEMxC\ngNYdf0EXVehRwqENKaQvuq9HXT8rg7tLX/SJ9HKhUfEk4Pc/hosNwSFTEXJ7\nrz9PJMYNPkPdjDqYbbdYMyQbXtweDQAnd4Bda7XRzf2noQgKsQ0wokSuh05l\ngDIr\r\n=zR6/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.3_1534502148702_0.720628370559639","host":"s3://npm-registry-packages"}},"1.6.4":{"name":"@cnbritain/merlin-www-js-utils","version":"1.6.4","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.6.4","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"9ecaef9111511b45c7c706d4c21fb62a8343aa49","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.6.4.tgz","fileCount":9,"integrity":"sha512-m0Ivd2ZuKxhRsvr4WYvRRodYrqvcGlU5wPdzygx2K8847E6GFWc6B0oBcWEW5ABQT1IUIFvTdLdLNjZJaneb+A==","signatures":[{"sig":"MEQCIF/dyehDgtAWFexRR6gkdMTWxUaUpp//WSgwcoIxyTlsAiAhdMD5IncLPCdXnMc8OompV7PyqJuR1JhvtS7e04Giqg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe9GeCRA9TVsSAnZWagAASY8P/2SYUczbb5QbpHkjw14y\ndT42teZerCBwvEGQidIRrWw2fHEdDcDe0FY9Q294qMWrldYLYOblqx5iOzjR\nuHZ0ZKc5zQcjM1bv8/7xngBCJf4jprz4VAh1yuLFwudOctVukIvZfr9U/5+g\n1so1Tpafk0akWU8Fb/Km/O4X9qBFFF0UvJnoWzXsntyXRm9zZ6CcmO/fERxP\nldpj47d+Mbn9QvVOV68jVXc2Ltuoidv35tm8uPsPnF9UOm0DyWBm5em3y8li\nzzhY5BD/c0RD+ZsOBYxKYpkvLqAIi8zjOWY5oTxJqod9Dc1KYBBsUPEMqfc/\n/Y42Kk+qh2CF+qzaVxwCJrLUQQNhTdt1WJwh3OeRobaSaTxDf9yZH2y9y6vS\nt4ZYCQJvE+893VZzbYubmECp9aNqVkTJTG5TDtMwju7LVYDxwg5fJz5PhJYU\nwRM0QaKNrBeEO3Je9s9SqRZF9bjtQSC3O0re+zJebab2LeC1nT21N/4ToUoG\nthEzGST8XA4v02XI1/b3l3pTkmIOLIHyu4xdMtb0wS9FkI+B8XBD7vtYtXpQ\nXtUip49y50Bc+nO9zGQDoacbGeS4MvHsQSBVCxjuja7NIMHC2xgmRUjU+r4I\nhP1skxxVp2iSxZz7CM9i8HjqnQPMIqtFfQWQmrUiZhWS3uorE1+won18vHIz\nu+6C\r\n=9yib\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.6.4_1534841245285_0.13789502687200406","host":"s3://npm-registry-packages"}},"1.7.0-alpha.9ed2d3ce":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.9ed2d3ce","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.9ed2d3ce","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"03657cdfdea7feea6d8d700e41e1f68998340e13","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.9ed2d3ce.tgz","fileCount":9,"integrity":"sha512-qBuYg28wAepdCJDVAQFyrEBuxz33vC6DyhNoVxO2yzej2A4eYLct66NxN75TAMrPdPP688wPQLTj7VCw38arRA==","signatures":[{"sig":"MEQCIA9XieynSEqZdl9TI6sDYNjw+sCYCnhaZ7JD5t77ot/EAiADsJgMdbx8DIxtI/ACWuBpMP/5Dg+jMWxhShUdfXeKmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66074,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbe/X+CRA9TVsSAnZWagAAPtAP/2fceJ7CloqqidT4F//F\n94NrAXm5Chs13T1chHhKwiiE/rjN+Dq2rfdFZd7hN0ea8kh6zIALiNiE9Hgd\nVG8KwT5UmNGJi/b6G3lLR0hQkPIGqlmCmFOkP3/Il+r9cnUsFxrjk59P+cmg\ncdWV60rTv09ocQY38IPUeKhXRn+T5usbmDKjd6iCGw5LhpAt2ytdlGkqxiyL\n8kyben8oZ4X5Jr0Ss6QOJ0bCuN78tz6k1ZfqUjzTr5LvLXNT3CwxSebul7u0\n5A3DIj+TT+V/4phT2fkqaxdC71hLQ9TXi9dg6jh0dGC03rOT91wjLQFjMom7\n7aqB/PKXTncBze4H+cipUJzYUHDbk6OuzMYuuEp+MkVN4a2conc8JFYO8tdw\n8RVaDxn2dV6toOmyhAnoYb6YAsPbqDV3QyepeIbiWGdfTHMgjgRuyIAl0TO6\nwhay4YvoO3rKspkcyaavcID9MC/Jx503/08jPJ8Gx188NFC2qTGSrbgSfBkF\ns7e1FvJkW2pQuphJLKlfaaTr+3gSIxmY7DXp5aBkTa+8Euim0mzX5piyaVar\nDBVDCkHTF1OOSE+qKl//igM0E/yQg3QAB0Tq3MdpFMbpMH/dPnsVm1GutL3c\nVyYp+cO5wgQ+kJd6TqRiSmXmgfP65xDf9oWybVR1QSeorsFOjVX9/QWO9oLa\nPSSj\r\n=vpjI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.1.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.9ed2d3ce_1534850557884_0.4103835914631988","host":"s3://npm-registry-packages"}},"1.7.0-alpha.54a06df1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.54a06df1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.54a06df1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b4e8c37c256dc29a355646ee58944959869f05de","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.54a06df1.tgz","fileCount":9,"integrity":"sha512-5PGwQX5nxQqvs5s1hRUXLoyySfg0/WTOsKsvABMwxO/NzDFjLe69K9mX4dQ1PvRVylRjCLaN0bnnHDXGSqsxmA==","signatures":[{"sig":"MEYCIQDZ0dCoN1xOCuN1lFfKZu2G2eePR7kKU5KQw03mOSEa5AIhAIeVOhom8w6u7CcOS+1kzKUm5GrnoA2taeBzd9Qv77j5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfmblCRA9TVsSAnZWagAA/igP/2mnGh+0Vgv5d0DeG9tY\nqIMQ1nNLdDYzfcpkeoS1W+13mnX//K5XnoqAo005yfkkq17hUjaG+qGMLePm\n+VyUb91JFlYn0A8JAGg8qOmcifdYdyQ+2ul8vx7KRiOlPIBv2NnB6L+R0gB7\nPmX8Br4TcJPHGf9lCRTVO2FUKGPTlbDHU4M7Wo01UIoyOjckLUQSoVJ7FvMY\nBb0rW7Zr7ePAQOhj4av7T4H7tfXO1LKhs/2nt10mUzhDEC7pHRpt0LIW2gGn\nfBvPT4UADC1sSS9Fm5JVIwkSfjU5INiSGt7BxbJ6O1wzvHPfGs59WkPNqfky\nhc/MOpq+8hLrl961sKkj/EjGK7TtvLOXBtcIC2chcEExJisOr1DsxWDjvkeV\nBW+Ld0SZ3L4iLD1ji/UYWwhU0Dw6JU3fGo5D1VZB7WmXFA+jKaQFTyC1nZqX\nbSbLvrq92Q6V8EaVHKBwx4LkXQKOsh4lhqQk3j94jgQVmR5VeR4p0T5TvvPp\n6mEw4wJ4Z7BgVufTSTvRjQmLDW/I+vEqd8FzI+EeeknkUMNnD7WSwEU5E+2F\n81VimvZMhBLk/HPF3jdq68byr2wxFZ40fviyQET0b3ag58VMAkltbX+wrk6f\nM43cbdN9BTgbT8TqUJnJkOmjfbaJ5xUGYfNnpeY0H8V97aYWUmsc0ncpLwlS\nfSMd\r\n=U9us\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.54a06df1_1535010532447_0.9393474871230756","host":"s3://npm-registry-packages"}},"1.7.0-alpha.8985c2a2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.8985c2a2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.8985c2a2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"0e9cbd4ed69fd49108d6fbb9ae9f29ddce81e9ac","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.8985c2a2.tgz","fileCount":9,"integrity":"sha512-3kIwhxS/tLAtdCpl8GGGkOjARyk/eUh84Fr7aART8x74+sfw7uyq0yoAaOsK+Hnjl7M6qjMnbwBejNdeswlgTw==","signatures":[{"sig":"MEQCIFy7SDn6YXSzUPNa9I50DPpuEEA77tXjAcoklblZYGP/AiBX5GGHKCj9VpQgV1MeGXyvkov1labt1uZyn+16QrU+Cg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfoDgCRA9TVsSAnZWagAAQ40P/REkMCCFNyXtmy1sPXDy\n1F1Q5eQkdKFvmIeBZK2TxUGdijX3yw013LivBZyMDF4qz++prYGPIH7hZmiX\nu7WJUifvz8w1wfunu/K0Zk1rvJ2osbVh2bOzYem4Jw/PZHdiandM0043LjM2\nuOwAw94dNCqArq+xPJDscNxJpOlgYmsZmXzdjXupabU2F2lzNJjGTYMd7uhR\ncjJaePucGgaKQ0rn7BWIBz0OUHgOjrjPfjB83ZUnYSZG18ga71yHgJXLtwKn\nr+6OFfGtOyQhupuzrAEbW9Kv74UHJUMM1NQZFNLA0OD7wPjdCFkGtuhlNofV\nCmtl0RonfWdc3OaLyra/Y8nS+TDvyn9AtUZqbqVqlcS1t6mhUO8u+PagNRDl\nqpaUhjPLnSFUNqo7gBLQIiy7MVlWFkcssWaApTNXaCtsgkAvf+0RtZs7892g\n8kr2dqZWlSaYbc0OklGj0q4KFOuUI5SLY7uOxkMfx6rkvUY1kxDHyHwwPOUT\nqpoIrILNJl17EI2B+sgIoeeMnxrpFnxwhwta+2kvrXnAfgX7TPM91gNzT0tq\nPPt3rzA/LFg41SJoPzG4y6CWfbyN0lYVv1LVqigTZBK1/S4PCiTYCY7Q0aWs\nKUiw1QCNgzY8vEgv3LigSIflK8PMfPLsxaT2eKB3j6hB8f0V+HLyW1+ctR+E\nAGr2\r\n=3wCE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.8985c2a2_1535017184058_0.12031437005854495","host":"s3://npm-registry-packages"}},"1.7.0-alpha.204e5701":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.204e5701","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.204e5701","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"5bbb86abec2cc40defb4eb0522c163d2b70c7a2d","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.204e5701.tgz","fileCount":9,"integrity":"sha512-WyE8V4eISvgxu+7PhxFIyLnJsp5sp47sCKF9JTj4xw3vDxdohSc95CyMpIH3JHtIfZV/auq1tRRtICEe3RI6OA==","signatures":[{"sig":"MEYCIQDUaHdkXne5Xw4SIDNvUG8N4S4WggaWHyuFvl6OORwzLQIhAONxuSd6N7hpdA1/Kd8aHAK893YMv37d+mAG+bj0LlMy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfoazCRA9TVsSAnZWagAA71UP+wbEC4WQuOlg4ff+m60/\nqCVATkyjLMKyYD/+Wq4jUPQM52He44aPVueAMbctuCeo+PvdfW+QR1Lu9jh6\nuVB0naHyQa9tEz58Sm+QjZgNZuHZTDh8zgKENEfDk1A7OdXN5980tQVIJll9\n/KBDGXbeeR4sgH6jn6lYQ2EkF5OMHnLRuJmwO1L1VMLciOOlp4L6Zw60Vtii\nXnAC6kraGKLvMmLjTw2S+v8BczM3zTXsqt8N+a+YX0mxeTNO6NTuBMoKJrg6\nBAkTFnMNITzYalYeM/oiKKlSwFhnK+T32PRgXry0xa2lKoVJNsaH0jgN3fcs\n7pwPQ1O60wZ7+/giEg/JWb3x9ySAIk5t71iuzEqn+vAZvW8wSculkIC37V/P\nJkmfzej5iUPZmUJRlWWczoqVE//MFArw+AKA5g+SWJ5FTK7tj3Rlcik+mftX\n5hhH3HhRHRxP+YrjDgfpY+TdBRK4L3B8+AOqE0qQLJmjR+PcVh3f0QhlbIiK\nxPGXXLkJLkjixuhdd1BB9cfJBfEnQBJ99XR2P5OEGBC8Gynm6g+fe8cU8GfK\nMaFdk2JCZC4kS0LY97FI2IynGlKQSXfs7XI3G1yPjZwziKeo3bLHk3ED1CN8\n48Nqm2QqotBBkwilgRt3dkNPSXu91X3jJj+y76RuaQUNpHdNli8fFcJy5J8B\nImew\r\n=9EXz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.204e5701_1535018674987_0.7964542521515674","host":"s3://npm-registry-packages"}},"1.7.0-alpha.2d09f0d9":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.2d09f0d9","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.2d09f0d9","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"1f3374d7f4e558bdc04097e3e9db5636a9a15e00","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.2d09f0d9.tgz","fileCount":9,"integrity":"sha512-E7AhNuHMkMDDLKkhL0FeIj4umUPNTXeiO3sPpyUQp1WghcbwCvn7eJsv3CnOroNBfZdNINl73VQV6fEPJe0tsg==","signatures":[{"sig":"MEYCIQCmSarj9exu69AIBHdgJOGGY4cvJrNxjemvoTaaVTLNqQIhAItO9r4O1XOjh/CXxONWGRFBPJy3xKoKpcmikA25es9D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfp2LCRA9TVsSAnZWagAAqEAP/21Hu8y2HVeIEaapltU/\nN8GKXiKrROkXMcr2MbYcl9Kj/pWhPgY6ZKY/8tVuPDfXtB41uBFsiTcTKIIX\nMWKe3SCnQcffg52beXsSBBK1QXsAGQDzCA4L4HdDEt+u+riVWdvxjSmN0cl1\nIcnLTC72FBFd0U9MUBlJ+qnSU4fCh7PZTLG42fHuxNFHWnmpmbfqs43KbaBH\n91qzftLH8FWiZy6FJDIZ71bWsDA3xnvDLRBmxmDUC5LBCw78r9gge8/kaYD0\nbDHTUHiO+y4IxD+hWbb0Bc7gEg7T6ktp341Qz3e29ZwBda7CuyFrN0BMEo5w\naALdFRWQWnekFOcMd1Ce0cl3an7PBY9etRhChfzbUqwQIaonFmpH0Qe9wsub\nLzQpXt2OXQ1CVfcFJb3cS/gNX50TPPldmU7bFNRfiS/uVZDT2c/v/zTX9Pgr\nl4V+nmAifLPA0xm8c/DtJJAPF10hmNofrujP1PTtHNRuCP/Dtg6hhDzikO1T\n4WRpKOukWbY70kBg5xsgyUOp3WVYOxVsogMLcAvEeo2MHGnrCIptKS2z6MBA\nL9JoRf2viBPxgOHYlPQCzDQ5fILrE/ZbsJz+nfXYfKQ5w7JIEJbucd1FircT\niUXGvWIbtGMtrJQymXwM3oPrekDvt8GxOvhyUcRmp4Y/Ek5OH7Ct8e8SGe0K\nBKwy\r\n=3tte\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.3.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.2d09f0d9_1535024522377_0.7973136609004607","host":"s3://npm-registry-packages"}},"1.7.0-alpha.f2a6dd70":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.f2a6dd70","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.f2a6dd70","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"4dcd1c8aaa8678043d67b9e5c88c3a572773f532","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.f2a6dd70.tgz","fileCount":9,"integrity":"sha512-D14ixSFWZZ5AyaWE0xwgLhordFnxvPziio/+Mhtr+gyjXiXMr7P3pLDAuC+HaxfXb4H/R4sLBZZuIgYxrSDKdw==","signatures":[{"sig":"MEYCIQDzDZw5j57pcGXGkw/ueR7LDx9/R0r2xx6Ejb8j5CZ8+wIhAJdE89Sm7j/s1K0p3s1YTtoyWO3zkcC3XHbA4/TNhjou","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbkO2OCRA9TVsSAnZWagAAnJoP/2RT60c/4T6+I5RzfCJm\niZ12FIgCL9gr0leoBjJtlsmLXUbxkivM3K4rSiYvN4YBmrVQ0VyssDtbTdOA\nr4tmESZrWmvu1NbO8vnWzckkiYUfT2VaD4Jzk8T8hDlhc8w/LRckD7iZ1N9y\nTKdmM7sd/2RwP3ibHoaXTmCkesmXPs07L16bYrNXXWl6wvM73h3JVMLC4d24\n4mC9riww9G59TXQp+B2M3WT/u+zrO6k1tju8jHRaOQAsCTYcC3b8KoO0WbaS\n7jOqMGVYwnRXRbHOMHY7inLRwMsdoVA7otrYSO2y37RN3AMl9D8Vv9x+Ejhj\nsh0PpoGbmsEMO5594l/z+NH9a5M1JfnsnupQSaPvL60UAnYI8Lan6UdkkWVd\ng7I0BX4yS890GxXal1uEjXCYEJgPfjKOW57nM6VF6GhhuMFeJMHb3NpL7p85\n72AaYBgwzZ6tYT/u+swd5sVbrxCSBg5xvXnmLLZY5W18Ab3Z0hMKgURXQ46K\noT+n7nAsAYzRoEIboA2ZbDEI1tJD4YO1yvNN4tTHXXOqmT/Iqqt0sIpYGzUn\nnqG2BCxfQtAWq/Fvz/2PGV713v1g0mWj2cCF77oONxk5MrPXbx2b0+d0lFQ9\nZ8SQBuSNe0M09pNvwAbp22avb1BWHRA9T/8v3Orq7r7aPVUCU/UCAj+9+cMN\nBK5X\r\n=zMtt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.f2a6dd70_1536224653496_0.4666617264668458","host":"s3://npm-registry-packages"}},"1.7.0-alpha.8b169838":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.8b169838","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.8b169838","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"8e69fad62df9c0066921a9c76c2ba7d08a20f2b8","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.8b169838.tgz","fileCount":9,"integrity":"sha512-JB32Oi8lJqEc1t2jNL3gVh4EdtkSJ/e60nS8t9Mcmxma1qZq6n4AKH+m93ZdVctNeT8dOeBCdomOJm5ifAC7cA==","signatures":[{"sig":"MEYCIQCniR7hg4b3+QhYuhWfoFvPvjo6GrBY+WQJ8SEkJbdBNAIhAJ6J0ylsykc5eQQ4AYiQ4wXGchXyPs4iHzd1xO9ITrwO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboODCCRA9TVsSAnZWagAAD9gP/iDDb6Iwvjm5wYT2rNIi\ni7CZ5A7Li1RJ7nQhc4qVC1aIuqn9gTEEmYPLeg4xWx804oewaHnvKfKQEcjR\nKM2X3TKxK7zoSCoWJmwzW+Ux58uZgJ/Cyhh5wacfysnJQg2EfC+fS0n99H0U\nC0KnmgbfsOqRnj5b0dCNGhCPn43uSGVwPT4JFl2OnBWOAR86Seq2Q3VZd6i1\n6SbLY44ccMMX7VGipciZIu/OzHjzwDDrCJDyQNZy/alVDPP4CueVE9qrEiVb\ns8BqDmffbbnqtlKVNwQ3Eluu4DkHx4rxWQEaZCaPSQnznJnTtKpSS123NIzT\nhIMRahnLMCAHf5OH5k1DqA727xNYsgDaQYJA3Zcre9qOT06dIdYt5AXqIPjs\nntIqS3Oogm23iPMhXPhzBBJFpkK2ootjNoGepz0wyItnTNZZ+uA7SkA1RN3b\nAHDLjODN4kheB0gnZBJLvEvSd7L8Drxrq/a5KS96bTnF+ePxWZOgKSbzpM2z\nXI3jUy8Hf4gBjE+SstchY/aSXc0rV6RA8qCcknvFT2X5wRYXf0hPNztS2doK\neWOiwTukXfmtQxWPTVN38zyofsTwOS6sqH6DetoAPfyyUVsSS0SfgXnpvQfX\nCBIKDCLAClXHUbAg5u6vWP9dsNYpawmE7HXmMY18Eb98qiKOcPXF6Ngtp1vn\npVGZ\r\n=ytQc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.8b169838_1537269953751_0.6816029684289655","host":"s3://npm-registry-packages"}},"1.7.0-alpha.440cbe7a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.440cbe7a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.440cbe7a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"76e2ad5b40faa092421444199ac5a26c26a3a120","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.440cbe7a.tgz","fileCount":9,"integrity":"sha512-mOW0//1QG76UE08tHe6JZdW87GLsq7o35yjqQpTbHaTDtDHhe3Bas5v8DIoeyLe8AJYF9zVY/tyggyeKVDQvlw==","signatures":[{"sig":"MEUCIG6Z19n7yWde+iqr+1wpp+2OmlMifn+CTp2ooBNbvUp2AiEAwRI3S2CSJXPayL2UM82J9EGIRNok13S52YM8WzNWQl0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboOM6CRA9TVsSAnZWagAA7KEQAKJjXKKJ8ioXV+zn4VAq\nKTBacgc3XUTDQe2q49tC6/dcw0NnnQ0Wc1vuZYzZ6yTQTnFsVEwOjhMWQmpz\nm0OZMsbsOZ/li3ZivOuquxojbOyndOJUJ+uLKxJj+M8NJDbgX9Vo68Qf/Lxr\n439RKMFT7TVR/pEoc7cfLDY0gH+Co9+sldpqC2lC8bP0FX0IQxjFbsbK5Hqw\ngdWzo25XkDSSyIvq+QdEY4fGtyFgkm03e6JdFLKTuXtx2Bhq/oeB7yL92EDc\nRXGA/wCHV4HXXhrLAx1a0IWyCIVo/nww/x1AFxF8xlyC7T+LGUzzqY34WEEZ\nv1HSpXf0MvY3lb9CrR8ItIY6sCRW7nsyyd8SQ9d4Gi3Ip5oH1eHKZzDzMeiF\nkPhoF2SpFtdtToXtLVDxp0O5Rf2nG6wP8coatoRV/Uqe+lCCbpcjvcES+urT\nDePER1odZdge/cY0UliLWPInI8nabvFEKgZ1j6P5l7nkjrjDFf4jaa3i/cb9\nb2SfALAjyqBqCDGcGVzEf3GvmMaPCK4s0jtIqMzgIY0oeJwYFEktiiPHy6q2\nIGEjOeyDKF67oMGkMzsQHugaEQnrKZzvMkpS0BhCAcnJBsRiC9vtTI7Vft/2\nq4cYqHW+Jvr+UrAZBh14/wpVLrTgN3CmydgCIDY239J1VBsiyNxOvvDWDyd1\nBuFC\r\n=A1iM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.440cbe7a_1537270586032_0.021951607168406495","host":"s3://npm-registry-packages"}},"1.7.0-alpha.eb6fe119":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.eb6fe119","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.eb6fe119","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"44e2427bd0ec06d3b8cb7c0fb5d3404b82a945a1","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.eb6fe119.tgz","fileCount":9,"integrity":"sha512-npA8hwN/1D4dnCwZRBshSUFuje4THZ2CrsKlawvM38pvf1Wy31EqjVkPWSpOw0A22kaiUlTwF3dmXaSl6WVA8w==","signatures":[{"sig":"MEYCIQDGWlhcms3bfWEu59lzKgmgne0QJAnmU6MUESYQfnm/QQIhAKQZTNB/YG6kS97yYiMzCutpHrkg3wXxPA9WRUfVsP/O","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboiU+CRA9TVsSAnZWagAAb0IP/3RZzlqQgubP4PGIxkoe\nhET7mz6FYbgoL7CNUf7WSP4UFnH6/VHmDZCoUMYEoWtGiZLXgkbA7Q5A1yPb\nB3WScHaohXTMMy/61tGxc7n3WZ8jn/AuDlasVAjBog+v02XfljR5vfLfgNk8\nB6vQ8wuubT0ti2lTraplX5+3GDCEHxjj339TBZ6tdL3IqO806IihNomS9rd/\n1n035V/ODml9lq+7wcPRefjxs0uWDzKXItmHL2CQm+Jzi5jpgbJURZ/+JIx2\nPUE5D2+N1n5njon5V0ERbQCCa5Hf9iSVvqX9Do4SWKqcoD5tLZHgCjo/bVdI\n20aAOkjJBo/9Zx/kRJiwvAT0/5C7/NnSW7y0x73l5+hwjBFJhePUR5sIPvIC\ndkb2AKkvfJTqTo7nYFJ3CsAlGz0HUubBiYLdgdP8vbiaZRHpCbr3QhqUkurL\nssvF8O/9jF2urayIiI7n4orhLn+yOzVXnGFukM6iUsunj1WM3PkRd5nvhGHB\n4PIEpRp2V+MDH2Zk1ueiAsbIieHqEccMqr2c+wsBtVMK7L3wVZHTI6pgs4pn\ngjK1reTlviIveoeQFcz3mxoZPVcD/1DeWgJ396BrI2tTlsZaD8QuKTlK7uwJ\nUGi+kY39ThgCt0jbxaJrffRYx8rl2VeANnif3Ou3xQTApsiU+ulM3CzmQEGu\n9fZG\r\n=C/sH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.eb6fe119_1537353021937_0.3639145217594195","host":"s3://npm-registry-packages"}},"1.7.0-alpha.80c2bd62":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.80c2bd62","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.80c2bd62","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"60b8f48cc75325d8f9514f96bcd9429c64b0371e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.80c2bd62.tgz","fileCount":9,"integrity":"sha512-T+0hDFZIv0LBSmLHKlqp7dRVE2K6TPPtZMo35TiN2e40GBL+C/gEvWb//Y2OftMEDzb8S/G6hlj6qgiyzvmhcA==","signatures":[{"sig":"MEUCIGk2o6/RxL/VoZqOWPDbbi+xXE+TsMdcB/nDZdOuV4R3AiEA0wXmRZo8YKckv0a8CE7empukz0QXE7299WmnZ3/DKzg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrfF7CRA9TVsSAnZWagAAbxQP/3z3css6rg9vDe9S1phs\nyIKZ0xSazfJcIcS3jfJcGwrEEhI+FYp1Fll6n5QsqAA32QnshmkypMT9wy64\ncEJgYs0r4ciK3QyTR6DIXRa5n4ePS5+1KuaTpY5x5k82hMPPCQxCxECkvTge\nUlLxtkvpFepZYG4qZK0AC7UcFJgCAidd8U2a6t1L1e9U+lyL83WjbbaX3imR\nXn+MS1957vjj9vmNPvh8bRAD0UAY1Uo/+nO8zWmOxzQ5i6X5G8w+O5YVXKIr\nqk170X9c1yfRhPtTKsSc7nwvH5Ekq/hMcSl2gttDBeBounpxzhr2FSs23jH7\n68wIk06lswkjHzQuyTOgydqRi7XJ+QwzdLU/BKPcAHiHvuBp15RqADyd7/2W\nFl63h7UnY6yL5BtoGV28g4cYPCTohgcRCJxlhXEDq9KfQUrlIORx9LNnSRDB\nsk21k8BOQPtQ4lCv220nqiMZ0sUuKl04ZHH8iTp0iAGfErhGRq7EGp4ZWCZ/\nPMoHEhJ9Rj4QnFBwCdgu5xMHT2K0ycjd5Ue9c36+zLL84vTkWQDeggWz1Jd3\nETWDjVxkFaKbGpUJ+mt+qAZF+F8Y1fMcudAsvst8nBItiAsOO2D1+vqcvMg1\nPg7luuvTq5jtvrDAw3UEl8mXHxXabUeCuuEMHJl2vhyYRn5CVoNGAC89nO+6\nyprZ\r\n=7kX5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.80c2bd62_1538126202781_0.935389742614315","host":"s3://npm-registry-packages"}},"1.7.0-alpha.e2c4c589":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.e2c4c589","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.e2c4c589","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"8cc987ec365a354f736c5b583d0f439f849a7e60","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.e2c4c589.tgz","fileCount":9,"integrity":"sha512-gmUPV6wiilNYwMP3Xxxbqlt6lRbvHk6Xk5QUcou0vGJtKyAGGUfLRDDTs+oxuILIZ6gkl2GvdDxbiFMzQO+XCg==","signatures":[{"sig":"MEYCIQCtnbSdj/zPXSF+5n2WBk/hQ7QOXUVNC6y8BheY/28hyQIhAPsy+ye0ep3pjXJ30X+uOuTYz56EzUMxdOkVi8KbsnX3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxwOmCRA9TVsSAnZWagAAAFAP/3s4fmHAmWEqFlzQqcDF\nesXo05FANJkq08TPR+vvU1tfX120UB++Yw5SMy4VMtyM0LcoYpQznJsruCER\nPE4kcMQhFQ2nZV2kV8eS5CrjxnzsODctK+9zQ7hhkbaRVulTtgj3odRR1TPl\nC9CXsJcxglkMdQOjHS9g4N2E2z34vMFWpkXo6hZNmjxYIvr2AMfJXmGytzBq\nFbhu9LyPo0gpE9zBAgtGQGrFpLBgJuq2i568Jz9JvUY/WP0kKuKFkG5VM5OF\nbMzLzC2qmkpAsL+Z+TNgUzUq3dvayicvQLBo3DJ8umTz+j0HOdPKbUoardUR\nqtdVgoAMSBeiQfvOE/oioB+yNUdyVu1aMVYeXoaEpQv1m132S3M2a8jrf2vi\nksHp5GffTOEejwCZ2snjZ9rXysZdwVE95xYTMk62Gw48JgA5zqZdjxRGYDch\nuP3pjhK9Vhq2WwLN9OKoiMQgxqs3MATaJzhqytokSub2MMWwJLlXLsCTaPic\nTi1Qvt3NclEcZ66dIfxN89rtV8q3WEJCMpfT3bCY41BWfdj8QZmEI8JjRYXM\nYReOlWGiwPLnNRpGRa0PrMCHsOvKdBN8CTVmGZMCYYDnTfxfE8tIqTxdvEQa\nSUEfYpUU1E0rWiHcppgC9gr8yRjEWwFQ+/g9g+3v2oxt+AbqBLdqIyTuQirM\nXJDO\r\n=Y0V7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.e2c4c589_1539769253571_0.2714794216073064","host":"s3://npm-registry-packages"}},"1.7.0-alpha.28216460":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.28216460","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.28216460","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"a28fd5d3cb2e2ad0d6d899876e785b5d10aefc93","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.28216460.tgz","fileCount":9,"integrity":"sha512-9I0lV7XIKigLLxn65vkPTilV4uj8fQrMCnZLW1MbEW2iD4yjHqq5GQ3OgxTi/UydiclatK53F5omMhI+7unvWg==","signatures":[{"sig":"MEQCIEQXf8AAipU/4rXj3mkw7YsR2dzhm5vU+VMF+gqVz91GAiAqKPAfpi1lmt0D+nCZVYVTPFV6tVoMrNx44xnIT1wINA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxwUlCRA9TVsSAnZWagAA0R4P/1s2CpYSnMSQHq9kykEU\nhDydwHMosxuFI3zNibhyMNLWJgyzbBHMqJwR8zOGhmahjPXuWiQ6oG+GE/ZW\nR0jUOrpL7mZE3tajD9nCgcXKe418zpQMFhCdGWxQd+STU+3jWyXars5GIweZ\ncGn+dg0UdruzAg903Yic0HaEbRUTLryYrSRvvt4I3L/A21NfVWoUu+0WL8Af\nGOMLPuQDzbYaOW4bOXIL7wiNv8lfhUhPJK51jyrm+eYyO1sGEOh+5gXjbmao\nrFvjMLNM4G3IIOGaYgkdsYD7HBPcP0dg9TlaE9wGluBMM13WQH6HPImdD09J\nDm5v1scVRSjAtan0J4zVpK+Pc7xKLr70hGq9Fw28rKNS8r221u251oC0rG+3\nrz8EgvLbOnfICsIxFWobAwCDpZbLWqBPjoDMEwMqZU+eDQJJKqs2ieGIcAVF\nUOfLnaoCTStffkufmYPr/ACPNtB0Lqyn2YvE/oILuNRqOATTt61ncglzHlfB\nQyAR6Abjiwk4bd6j/OTd4PCBGrg09HntDOAehRp4kqpDWBQHwZ5YgCoAFnKx\nssC5jHHUopNnrGAaZixZyTKskLdW0uUEsAqpYwm+8TlCTR3aosZZVmDJJinu\nZ0AszoNPluvfflGIaTgNxyzwVTn1XYRhg6mfFWKVypzzLP4cmglSSEoQSkit\naaDB\r\n=Wkqi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.28216460_1539769637070_0.127914751602636","host":"s3://npm-registry-packages"}},"1.7.0-alpha.3b040fb3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.3b040fb3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.3b040fb3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"843c798ffae57bb3bc6c134f6b76fca09c00c309","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.3b040fb3.tgz","fileCount":9,"integrity":"sha512-ItgMXHmstog9rFlTHU6gGsKAsEEnXBRfsjBToEWXYBw+EzOuqoK8gK/sXvxRiohzRwcDL3LLs23We4L5kqgxtw==","signatures":[{"sig":"MEQCIFY44eavzKVPX4+TctB5/sUdncpqIll/zn6TmMDHkqeFAiA33Gc+mp4SY5EKx4iz16krhtOy+v5rmhcNVc+KGwgKrg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxxd1CRA9TVsSAnZWagAAZXcP/0gR7pduehtz0eyp28NA\n5RBmEgrLw4yvW40INcR3qxgsM1951r3wS77nmt63iFStyQA5mTQKr7DEM9zc\n9ikutu3yPhrf15WCPUcZa319/xnxEccBIHhtg+SK3dg36p+EQNU2B6N2Ldwg\nPFL9oKLTIbR/FYeJ9oytABpGq5Ils5N5vZEDjw1+vPmaKtpTOsyl9twMyAVS\nOUr8SzS/1hwJpAq11Qdh48xAvoEmmv4+jX+lAHmbKVh999TNJV9Mz4RbeLAE\nn8I8KTjdwWfa+9wUFSFQDBCzhPwms2Q8REUiV5cIOCrUJRbmjxYao0R6TJ6J\nR5mt+VvM3Zqk9RVeZjxejjj0pCRqojsepJ/bkPO84UN5HAgSzzVlmRQcdO1Q\nfARkJxnYo8yKQYGaDx1VmQ/UM2f+gaozg6PEsTHlIbkgLeNpLn0AKSFlEh4k\naee1426tTLHLY4vvMh0Ekjy102XiKco8jj+1MVCsJKLWzppuqefThNwt7InM\n7Ol5dIG9v6hFT+PcBEob6P4xrLiJ7cGhfXpCTM78CNE814NgaL477ne7QfOJ\nyDpwkHZe+m5g/FiX1Cceot1eWNXdKvWMJv2w3UNhofDYBvnYLOpCFm/GRiE0\nqJqlUmzCtdNq4NjS0xFmp+/ECYUgMQOaH1rudFtut3VflT0N+jb9c+ORRRG0\nNCsg\r\n=WskB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.3b040fb3_1539774325076_0.2208071435868415","host":"s3://npm-registry-packages"}},"1.7.0-alpha.19950df3":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.19950df3","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.19950df3","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"3a09b2b58c54bfb85c966c1b80814f2a8a16b7eb","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.19950df3.tgz","fileCount":9,"integrity":"sha512-1hbdKBU7zSCpLuQGFXIaGV1ZfZzvR5cVPwnqiLJPgU9GRmwZuzRf/VomJAcn75/uZ4GC+ad5j+zrlyF1im7u+Q==","signatures":[{"sig":"MEYCIQCnW7quAnHZ3rdbvb1xTd/9ClML5YiWTyZv04zLM9OavQIhANucKDcHZWBWBxDyGoaFaYYv/B3NdWCmQVr7Tbop0AEA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyFG0CRA9TVsSAnZWagAAip0P/Rx5CCbB23PkMC/SyM5B\nUWVMPrZHws5mj7L4P3cz2b2P38enhsvau4SgqtFW1iQ0ygaLVv83a2Z4liR6\nVIsJbLX6wCyi8J82domVckPM6tj9fnuXPR4TD5x+rtr01odT30E94xg5u7fm\njFI3uIvhzSYShy8pGPH8vKnbMyp2biB51hcyCvIo9UY9eu1w+CCIaDhw76Fh\nsMGjKUZXv32N5Z4zlhiq1y874vAf/9ZuVz2H5FqIQCOvclZfWBkx5s+xWJMR\nXbg3TqChkAizn4Y0EQ1qoR163rYp17zjQ7A/+L7ywCLA8dMq4oirk+r86T3T\nlltM7L+oE8oFRry1B+siZyZyZuJLliLwVGA8GX7a7kh3rRQR9zdYSFMN+pzr\nWQ18Ldhh2ejTrxhdeAdfcTu7kiTCQk2sfhsfFGtSu8EC+7QErioaQCOWT5vg\nd48jynmMOXcigk6gmAe6oWeX9CiQiT52JQ2Os+9Uo/hUNExKTf6RYnZzOu+v\n/383gTGFQkSiMJ2Iuqvxq/hxESXG8sPGN6yF5WKe65zfJ+Axdzr8OUvLCnXb\nQ2QyON0iKGKl7fTKtm8zACWXdad3tkQW/ibOjnLQn6L5F4lCdOuyzLC5rTzJ\nJWcgnMkqtlLi3MdCpRbERsQ6MfcH0mQbGcnwu6EJE+rU/1ofFYK9HbPLnsHD\nMZTf\r\n=0jTz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.19950df3_1539854772040_0.4226338017475384","host":"s3://npm-registry-packages"}},"1.7.0-alpha.6323c901":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.6323c901","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.6323c901","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7f55ba47aa283c39f657a16d983347b6313d94d0","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.6323c901.tgz","fileCount":9,"integrity":"sha512-rKrZTUl5+E+aZeIBSSmKlznpjTVUPrMTZ7O4WTDginzdnoq8+Fb3oUFMtnTKunMcEaHtYwr+VqBw/TQJ+9UiMw==","signatures":[{"sig":"MEYCIQDgzvV+m9gT9q9ApebGgW1I54Sh0HNONJA148gXVa8kTAIhAPlDmkHfxVOw45o4s3LC5yJ/+0HSwOOjsuV7nRqVxCvY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbyJwxCRA9TVsSAnZWagAAPWMP/jXb8UJcmZo5VyaDcEvQ\nNNeBJbGxvg46aTLSVhoVNLXW8I+t9zJ6Tba09wtS8ltA6hxM6ZkfhQggB/Qm\nYJm6NvrhkA8EmGUOY+GsAB+UL96bpRIJWGGTY7Ewuxk/1j7hq/MG2NW2DjK2\nNoFOED/cbxVWctdn3oIyQe1hrlGEQvdRprFk3RREANkK+fJ1TXaZe9h7OEJw\nxfdW+2RpIbgV34ZFIcoBrO9XB3ocewoFzjR9n97ls2V+ksj9UaoXvfJKi/13\nWSTCCqGB4CWUWWsDLNkzJK2d1dxMEid/HmhVa6/kliRnIINILPARz9Y+gOps\nWJWrZZKrm67Ay6QNp0VHxgtZX6YZJ/8p2FNzet/Zk+cpbOH71hwMJklSKYUN\nZIIMUAumrnBYdf5R9KXtFqwNPEkcVHtf9dGsiqOwQOP38rFFbWKdF1Loja5c\nghuNbQ847xmAEPQMVslNkFS6OOPGr74Sg0GDTFrsR7qYFUablMI+w2htf5w2\ng1utswCRZEZbW4xSnxk1UX4eJxAdaEuxE+VzDyfdEqlrIFgSkn3Y7OSotlcb\ntiDvEtdiTDTcGl9MSVmqd5flDQoni96epcKIFWj3R/AKow9m9V1yZdtqR7lV\n5dOYiRTdlfkRgjL7DQRMXtX9+Uf5jwpG0bQEUxctsiFlroPcjjl1GcRswx40\nAWoE\r\n=fOYF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.6323c901_1539873840404_0.6938911015655889","host":"s3://npm-registry-packages"}},"1.7.0-alpha.41634e2d":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.41634e2d","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.41634e2d","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"c0d07b134fc860eb3b487f0fc3ea3465912a9e5a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.41634e2d.tgz","fileCount":9,"integrity":"sha512-A3d0/xFhgE92tSjDKN7u2JaWegF7iL9dJfo/Y0vZ5S90F/5jsgWiSFzDIqKFMBC6kNBmQzVeqGDQEfK/A44D9A==","signatures":[{"sig":"MEUCIHVoPEPhCB7XH29ibTwk6z6wIFXHlA8+2BYo/lAc6opfAiEA1Aag5PbC2tTefEfDLyc3elREBP/5mAhLqB1GfqX5suw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbzZ8qCRA9TVsSAnZWagAAYp8QAJL4IA3wwHxipXVICNWe\nbK4bKauD42JAiYkOBkYedpjqGXzeTyBhaX4RR9rkr3taLYAatUfSVTn0w1Zo\nSrPiQL5o8fvunCVuQ65zgWMsdzK/+C5isjji8T+i8E3zVFvuVKDpJfbhUt+h\nvhBgeTn7UsUt1PvQNyWYqHGTrsP+eSxINPetK1M3V3nxgWIRucps/aLKpKBj\nyPEH189xn1/XTF5jxBhMlXlbBRBWOdiGEY1PZI6TzEHxu12jG/8D6iaJD8DL\n/MOSldA0LyQcRpREs2pHJZLfp5r+vhkun/zbyvBTfk6XRn84+AJC1MCAZFgr\ncy5baAG1szRuI9n3Zi23FKcfjl7FWqclw3V3d23Tp9eVEIHPHp1Em0CPNtuw\nZT0gJ63PbDfXkD9BLEulcpDoflKJUkERxiexGPjwwBdRa+QT2wrF016oQd/d\nKqMvFXxOL/p7RD2PUj9Vh5pCmhRSzUho8Q5pwu3ftRQrmozbHRZrFn+FEKKN\n9eVfyfWa5XZbZjxHF6yg5bdTmb68qaOP21NRm8iXW68Ipixlk6P4mtiBrAJZ\nXMjrUpkG/MxdTCquJzHDV6gBvT6KOtMdLA4grrMX4MPHEkjr35dN8W04lKpf\nQop540V6jEcPUAPormCvhKRs9mUTqUnOUkbDZnfyBszB+F8eMTywzZP/QnFP\npgja\r\n=BJUZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.41634e2d_1540202281607_0.2678159158841549","host":"s3://npm-registry-packages"}},"1.7.0-alpha.4253474d":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.4253474d","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.4253474d","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"9b1df7195990fe4309d53980d154e9334527db77","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.4253474d.tgz","fileCount":9,"integrity":"sha512-DIfx91RDm3cCzOCSYQfWAVbFNjufNRscJmQB3NRcTb1CO4dE+bNL8l+HtzLjJ66M+8818cAdfGj+iqVM46YFYQ==","signatures":[{"sig":"MEUCIQDwiDHspql3Cpf6byfD7uWOAUWOzg6och9dyenKDmDN2QIgFfjerQi1lBMbmPxAnpDM2b7OitETo2WUVIRWF99kGOE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbzduiCRA9TVsSAnZWagAAjksP/iojJUuVf/A6e0mBj6sI\nm1rW0Z1cFAYFfSFlX0oCf245S2eWfQpgFHuCQYn9FwzQBZwRWz+/mGg96Mik\nHiSVtqeJcxPHnHSGo1FdDiTZsvhj/8bFpEKz523+vkEuT7/pHfrIFpcx1187\nTAgYDQFyYgPC1vII5vNGYndxMIbNbGef2LuDth30fF7nG+0NOJLvIsreXgXg\n8K+6uw9ZD4sApqQUflyfbufgUhmf7ETvPHcRpJpAbnghv6iU2N5oiTrwRfjW\n8hpk6/eyrDlBw1JLj5UwHZunRl9nk4F0ncbdYjNaRfT1DL11j4iaYUr83NpI\n5jGWrd18YXCsGcpCIwub8oZiwfqCfVzMImjiZJmpVWNgIPE/xPnU+/FrukXz\nzRvmUmnefzaG8SiUjUEW3POJyIVj1xVp1laa5gsoJ3jO1WFZCOjfzuEFcsTd\nbbdPj+f86EhAkQGz1TeC/cktUXZkL9MghK6R2amgDPVK+X+PF+dGwX5y2k7B\nAynO72MQu6XMDPi78Pk2/McJgwKltfjYJqL1pxAYBYtutHwLSQkVBqhPKMVc\n6R0v8XKa8kVq5uRYou0MJUwS7/BhnPPs32qQG+Ad10dNBLxficCLabVBV785\nzLsOnKio0SEhnUGI1yKmRG17Chz0Vuphmy/LZZY12A17XLIom+FOBoHwIhwM\nBJHt\r\n=Qt3i\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.4253474d_1540217761260_0.2029649941933993","host":"s3://npm-registry-packages"}},"1.7.0-alpha.e0b64764":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.e0b64764","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.e0b64764","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"33a5671c7e436538eeb4fb2ad464d710a0434746","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.e0b64764.tgz","fileCount":9,"integrity":"sha512-9XJORwjUFMvYOUsE6OCAcspj/UZgJuhlX4Rjbo+NN2mTNfkL+wGmu+787k5Vz4QnYCWNGTiOtj7lidV4eYJWvA==","signatures":[{"sig":"MEYCIQCh3dPcWaiWlf0W4kZfP73ZPHzYpxzHa60vGTDEYDAeNAIhAP5Xv0x3avkmoG9DIaNoLQqSDsfKwXVZcWWEtHzmzWFs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0uAzCRA9TVsSAnZWagAAKWsP/Agsc5DFXzanGuMdxmgx\n50Tz3EoCDma4bZhx4VI6yZC6ChtWdT6HH1Dd0yzAol44nYbGc1JKoJ+jrXbq\nG+u5EkMAfQdDHobhLOFDBwVORB4zGWnwnkk3G6wY1fsZP9r5saHxC7qtQ3hO\njlJQqQYX4srIidNaNvBQpsyRtQQAh9kaqXRTPpz8MmegzRdSd+a5HOXUdxK2\niAunrHWopoIMqH3I5McW0fhyLL5eKebvhathRPbxQqedDqvUro0HGV7w5Ixl\nM3PEqfK7RuupP1Ce5LTXq6obdLxlmksY29CgFMX9Plkuyrf4CjcRFQK4FXvb\ndDGOxM/T/XZnpBDDKQE0Jc7BnjWwYSZkchSse1jw2k1D2/YZSP2CbMEqDQcM\nH67GM4EXfRybp1kvwHC1qDUqbgONF+VYiJvnG9geedwwDQRlNIBZocztaEhS\nxJQ6y103VXPSmLq/SBDg4t280vTFMIY9Xue/oWknSLZYBpFd8zU9zhVIgJNL\n3SWHfzhwZINJICNxQhuaxUy975CM2Rl/MDddH/Hvx9FSqvTGzsLlrxNq3XA4\nKoq/yl0DGaWGuJ1WypXsxKlZ/43iVHyUJxos5A1Y8b8HPqu+vHOYclQzAVrC\ngVJ+iMcw4MTPT2Vz0s6Cpk1rdPrhkh9GiapOPqpmrVJ900a1lL1hoZgEfdsJ\nlDGA\r\n=qFJR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.e0b64764_1540546610521_0.1791603770380501","host":"s3://npm-registry-packages"}},"1.7.0-alpha.c1395f25":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0-alpha.c1395f25","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0-alpha.c1395f25","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"1f0166c97c5c1e57c96f5be05824aa699726251a","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0-alpha.c1395f25.tgz","fileCount":9,"integrity":"sha512-sIVB3IVKDnH4DUGAdULrDp5xLBVpQvDPSZxPcIUfSodx0fdWFcujK8Tf35D5rJKdun86biuo02XLSpA1QFMUNA==","signatures":[{"sig":"MEQCIBx5vyCy2AguEwoo3js3FColVIOpvHJgKbQWht/p7Gq0AiAwZX0/AeJ74F8NKU3mzlKGxFy15sGzNUeZsbAdnqfzTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66580,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb0vZKCRA9TVsSAnZWagAALmcP/Axbo0xzlMtdL98S9nIL\nViY6D4UfqE/2QHoMlPxCjuUGULpVDMd9Q21CrdCPEO6aX31DwRFy13M37ZdX\n80moPZdIhDE1LYjRC6x7wYfqmvjK0Z97xMHGQ7Y8d9UPe8mLifBASy+Erp1c\nGYX9I2LAqeAOhRGy7l1Oq1xZJkVV0Q4auxI3rrXlukQgjDSMTYmCLPc8rgTw\nPrLdenJrouhbFoUQM5tYRXn55Xq9Z1ny/ECFk6UiydqPohG0BJOLf9GkwNNP\n3nHqNZ3Tr/dmp2PJMhHWklfeMcHrFa2T58qKCMkKxuYsT1qMp3gsZmtXbK10\n3tOlgURf9ElLWQ2ueQTQbfGaukcOG6HPZyB9zAlDWwl4kS9l7nAFR4Y8PwPl\nOHg/TeqV3DTfs80m+VdyS1vzbOE0u8WS154RPwg9oOzJBe5LmO3Wqe7AZBkZ\n7YK3+PD3WSh8Kery1y3u31T6ov0jqVrZzfRgBmibW9I//3keg2162y/6k5JH\nCmqnAJe8eHEHI3AgQ5ny9UIZio37SScnUtc/SsChmvzN5XqrdahZtuRpkp6L\n0Lmkc1XVSHZfHcjDMXqG8gJdKtCCWCTWfWQn0u8UB7HpLkk+7SR8zzO35fsE\nGORWVTJ0/fevPFixqdL2FeCTZbdxQCLs4U+biIynfIfDc3jLfpQ5OdVxhIoJ\nYkNV\r\n=zTQ3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0-alpha.c1395f25_1540552266107_0.9806069088712654","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"fc3d180dfbc5fd375986e11d6ebdceaef3e47d80","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.0.tgz","fileCount":9,"integrity":"sha512-ckXcvvAehrKwBkftsAiI69pnkYhSsgzjBSrrrbA+1lt/k5hm6iNPZ3WxlMfoDVN9A0Xn83Dkt1Dnnn8vUZXpIQ==","signatures":[{"sig":"MEYCIQCmqzH8Dhe3PoBlbrg7IMQY+f4dslxi9o3gus6VqzKArwIhAN1+SbMtSaPFWhWR98y90Ch+0zGPC0GW+pDxv0J8KcO+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67285,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4GK1CRA9TVsSAnZWagAAyjoP/2Bn3odairVKOKMCO8a7\nH5449ecZ1q9Mwe8z+UiyoT2hTW2BerxEBQDAMGWqhWJti4y6udDS09vFctZ1\ngfruZAt9o0hXZqTbdgGvVKwTAb0Ybf+oBF96toAtXBBZpXeBNshVSRxLFEXt\nDuuvTDf/uDZskKUfgVncs5KZkvSWIKFp1GtAQufbm5bCVSbzPHxuoRzRjV+N\niZ15YJxS5gzK4y/twjoDKphdWl8EczppGyGISwaK9er6b9MHQEN4+MCogqjL\nENir5JVLkrYccuIC5D+9TCv9tpblnpQC5wHQumxxtWnHjWPGWIJfgtGeWTh2\n4XnPvpUjI7H3pIgi/qerwxg01UMrj/hb4CQQpEZ8EvSSUkq9UhPcjHi0eftg\nm1uOojxsIJxcAqfNd9K2K60tlsVYwSpO6gwZ6B8MS4DKPjx7/MBVRuLk+v1n\nfVia4O7DRDwYBLOTibxfvy6ClwO+9CwVPRHs04FGoZw1YCkT0LS9T8Deoib/\nSB9b+IUjN4huKLJS9GXpnJTHUkc+VrNfvYnrKy2XWFKMTpGi94oS36j/jclq\ndgnnBn0gPOP0LIZq/EDpDil8Sb90jvavyVeVWT9tiJ3OBooD6kLF49Plu6xT\nZnIHdRriA/rVXmuD/3KfuIihNLaOCuD5Z0qo9rWWO0hnYXsDAfnC1K7ruWRB\nniEi\r\n=/Y/d\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.0_1541431988055_0.0924638570384575","host":"s3://npm-registry-packages"}},"1.8.0-alpha.d0b3d1ad":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.d0b3d1ad","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.d0b3d1ad","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"d6f6e843b07518c231ea75c6bdec52cd2cc49458","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.d0b3d1ad.tgz","fileCount":9,"integrity":"sha512-FB06x2uYYA4MbvbbWjuHGRfTC21+6NkZvuetANK44hqtmUb3Y71rv7RRKuHor+pf4LTi7YRwju3FuLSi0QfOaA==","signatures":[{"sig":"MEQCIG9ICY8xwDeAB1eBlw8GHedfpcTKAAIh3wB9sBF8jOIkAiAe7HNB/xXXt3lXxanqjJQYsXg6dwq6Cj4wSHm5sAwBmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9/U7CRA9TVsSAnZWagAAt7MP/3BZ4c+L3cdwrbuHxGAS\nv/uSZncbRHMKSQxdfRIH9+xL7lhinNkVBU03r/DbcV1TTZUKCvTh9GeK4mP6\nyZuFi0bLKyXq5DgJibOUojAC3oB7Tj+tVm1B5dh1M4Vc1+LpAN/AEJN3jz81\nMtXtjTgi1qHBtXP96OfLk0S7oDgRyOus3lCv8sRKp2QzaRCenBF4i0Oev+6c\nSWXc2s/+ajR1+ccE0m5HG/1HwxFHRSGAVhleKVF6lFDQIezhxH7ceF05/hn6\n8NBV3b41ApKwJ3L2KXPuFmHhK83WPM2pSQtbtUa9KmaK5JOsX1NaQrcCgYdh\neySRLFUVPuPdGqmE4ycvPwk6cng6K4HTTeOdFsq9yuNMsad+2TCr2v8cTmpa\n/ju8p2TG9s1Rzs44ouhjU/aYQmpdAuC2QJcK8g9E9wWovlT/yd6A2cBFV6Gg\nqZcEGWFMMpPlgfXNHhFOMAXjqaYrqKfVt0MxokFv2/9U25PGSa7FmPWFfxfV\nhJ6Zj+udc8JB9kMb/v4atnLMKrzmQVIX8AGnr2+tcpQoTK2HWGrqDWHCdbWx\nU0cAUtFp7wO9TvlmpNlpkgJb3WxNJwXHudClzptNxiYRNkOfxIJjcTLE2deQ\na+WcYvbYEd21MmRWpTa9Jo1ytRfo7D0irRsgj7gxNMhJfLpuP7cRCjkrHHCT\n0IP+\r\n=UTMW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.d0b3d1ad_1542976826633_0.8498411468832794","host":"s3://npm-registry-packages"}},"1.8.0-alpha.a2eeae6e":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.a2eeae6e","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.a2eeae6e","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"dabae3b637577cfdb142e865d1af7a2aa94ddbbe","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.a2eeae6e.tgz","fileCount":9,"integrity":"sha512-6+Vz99CjTzIeLVhbaASCjoboameCakLa47u3Dh4xVSuR+gHEBF3J4fUoPH4CmIzsKQErjJnBfefAYv9X2Illbw==","signatures":[{"sig":"MEUCIQDPzka47SHALeYO/qpPLTOi0mjJxZcRYUZCTZsBE2K6wgIgM5sq5nlnZnkBloK3QX1NRS6vuOCcGduGp2CaHG8jmfM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9/d3CRA9TVsSAnZWagAA3S4P/2YorYTmvSgorgM+CBkz\nblPG58LQV+SPf82yN0HELXzxCybbCa58T0jT2la+tUvNj6dgFW/I+dYm9YoD\nh7j946osS/EszYXlfBaYL3LDKl4TTuniyGYm+0bEio9p2M+qDs7ieKrsDzTm\n9sF32UOtnLIXyrvl2aJBbd/moMrHJeDMpBfkYrNFfwrdeR5+aL2F80mW/CAE\n4ZGVaG4CI3LxJtAblRo12GGJD/82gC4I9UMtlheOMfstOo11wJ5/wwqyP2t4\nlhYN22cObDPrTk4zKtEqaECmog9lF4QwSfDAZKkAMHwTNwdqoHFkmGfaaNnV\n7rbNdWpwYTCxWHdSNUQDW/m2lRQZAW8ZCf7510YV0IhvYo4sqedbtWwnFZPC\numdzA4VvB6aItzC1ZeuwqudvbDT75NNgwpaa4Cj/wZXt3ZCMqRLLjvwk6voN\npyKgr8Od/bYyYNtfLtoZSZLBMq16CbHs5TyxF9EYLT13MwaSA4QzgkUAujC0\nmgeXAhjV54aYgBcqjH6yDLOUr8YJUrgB1geBYjP5zxiP6zR5EdX86aMkmqdh\nEiDgvp5V8apcD2IClpKc6iklGggFv1ChDnD/iKfjd989hImuTQPLEIbW0A9r\nzz+4z8jz+hsOyIwat7ZUneqcd8P2OCJbYmhq8r7WlnqzwHuBckveVLO4MEKX\ndSgw\r\n=Rz6p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.4.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.8.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.a2eeae6e_1542977398420_0.1263672671803442","host":"s3://npm-registry-packages"}},"1.8.0-alpha.4be3cb6b":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.4be3cb6b","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.4be3cb6b","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"6951b4036c4784c34334d29d212d72fa2d3a9f2c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.4be3cb6b.tgz","fileCount":9,"integrity":"sha512-TJoQQHSh9MoJ8AflajYLtTdMQrleL8OGpPQL+dAKZ+K8dKsl6DFFmOp2+a1GuR4rj20YwSq6qrSiwrF1cDTdMA==","signatures":[{"sig":"MEUCIQCxSt7Z8Wvd5x+W/Jf4UR4Kbb9Y/oxPtGDrwBMp+VuebgIgKaGF5xiurYRXiL+YSd2pAnHxSEFBnWqjlFFgW6sBrWg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEkByCRA9TVsSAnZWagAA3QUP/14UC5o0ffetf8pqEWD0\nNgfrGtlmfs95FYDymbGyQS/OhOd+PWA5CfDupvMGII/kHxwyLde5OMCgo56u\nHxMwTehHU6cDnKeW4TXGz9giZ8KHS2IvN5pFb6TWzeKxSIbN39DCMt+F0ft6\nR5ExfMTP37iAiddTg+83bmovr79Q3fRXVyR8i4dQIf12MsN5osyRivPvLJ8k\niLvdAHAcqji7kKT+Awga5dDIl2L1tfYV/DqJ+BD3L4ry1yTyTdjiz4GMq0+6\nhbCmBbycKpB7IvsbiHnQyrzTie9nWkjnfBZw2ONhM5r2NLUYm35BbNe3O1jO\n85jQJbeHmk30C6QEdslWCjgBEGyx2cv/QAmZh46fAKFj5fxTALTjCOpMJ7nu\n8IUOyMs9NlwdZsIlVy8in3erZR6py3+6DIwjSVxkjv/OZiZeBKeX5HmgHuab\npkrLRS/4Ysw7m8ngSdqxtzRqclnuHXhWKBBbNItJr68P8isilghokzlq7oi+\nXKlYdAH+wjd+4JxjPnSEoJZR2FVQ0kirmLjnaDa1s5sqHGYSMS8GK+52hShM\n6JIO1cMjSijT4U/Ps9FfLzlw88MEUsVVuum2sp1HVI5lIc285f0HW7sXS2yT\nHx6UaPVoHOoGbI2iBeuDdsXGceBARVdsCMwVGU4mnlcc9iih5iSGQctZD4ir\nPG/e\r\n=DKUT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.4be3cb6b_1544700017549_0.3671575566710701","host":"s3://npm-registry-packages"}},"1.8.0-alpha.8a7ee4ea":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.8a7ee4ea","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.8a7ee4ea","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"67dbf2b62a13d26a91c7445cc85b454961694a23","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.8a7ee4ea.tgz","fileCount":9,"integrity":"sha512-ZuPvAPbOWmV0QyuGkOTgC96ycytSTQFS3g8KMqzFtYcwOzNoZAC3nB/wqMmngFnkmq+gbI57768De+1Snr6ugg==","signatures":[{"sig":"MEQCIGjAWUg87EfBvrY+QriENUiAEyrIzhWNXAe/FptZ1xyDAiB2XJmrjSzkNgJ6+YOMnTvv7C7lZ/quqoXEIn/9Qioc2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLeb2CRA9TVsSAnZWagAAP5cP/i5va9w8QEx/QFbpHnQo\n505ySyTiT/NhYQ3+AELf7yii4RXZFEQqiqd4yGY4aGMsg5HIDWRMSaDkrKgv\nPmPwXriFJHRQvmobdBSBGQc/s/ech6kTRbhFCMG7XNxZ2Gtj/E466T8QPNfU\nKJnhzpFcVGA8wpfiUxTZa9jMDyVPp+OSzX80XepcWpNUJln+ZOOSJbFuFPtP\nuDpUNel8iUswNrokXqhKHMW9RHKV2gIU60tnqebQM37wvJLq7vMUkARtZWLW\nOOjSN+r9bcfFZZexZ3WxwpO0F+9AqFgSZsf3TaAkoCfwvSfbHUwlFcSMbTWn\nQnbouJrv3aoG7ew+rkdkyzbA3AC23EQjtgrOTVedWHx+qBPGwQ9gzyFH7Ac0\n3d9YMWirK7ReEG4byKc+a3r9YZn3smy9X7SqJjFg5D4U1wu74cnifh1pA0wR\n0erLMrUGOF+DsEaq6KaHSAadeuOTXmC07Bg68u1SLSWeMyuIsonigbpdtcdO\nakZvIxTfNGArOUTBZEcbsb0325yEZznrazOdYHoRhsujlBPdMQptj7VGZcGU\nDPlMf18IV79oi3sesyVE0LLlh6UtohLOz5hxsxyl5HAekRWXSiqI8inUSCcG\nUSBuZSObq8kRZYqjCRgOvlt0+cjnibi6MmzRcX+js3B4yktdmiAz2eqVAuO4\nmcmI\r\n=scvA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.8a7ee4ea_1546512117318_0.3196581034376287","host":"s3://npm-registry-packages"}},"1.8.0-alpha.265c7297":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.265c7297","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.265c7297","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"4a93d9272498a97456a5e048e21620526ee210da","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.265c7297.tgz","fileCount":9,"integrity":"sha512-dyjTAWodkJPKagc/euxzCixKau1RVEX6/+8m8Vu5CTdx5MndTyjTHxTW1hjArYq6TTCjDfs8OPQhO7WMtv7ymg==","signatures":[{"sig":"MEYCIQDeiIq8F6rEnEb154yPrs9ZWoHpd4hhTkc7dzgRXDtuAQIhAPLhFNJlogvsRm6oC7U/C/Gg7BwZ9LOCYmY12Qq+j8SU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLfngCRA9TVsSAnZWagAAC7cP/i9CxHbA3rs0HjrWBYDp\nk+p2x3JUMSwDFwIjiv2wFJIRUOqn4viY2zQVrlKRRnNXJRurN+koT9w/+E5r\nxFpkC5aDJrrCnV8pwM4pOHFCPYLYQzRGBTe8oi8qaAQFq0vujI8vT7zrCswY\nFxwKeyUuui2/wLcTI1FwxQ6AX34qEeM+BZ9FhFP0f7zhcclAnSyzxYnqmcWo\nPzFFAig1GEZKnLJPTkVHZ54+RnBizV/T3uifPxwDPyf+9KpxeMSKYZP1Ox/X\n0Ry3ELadWdAej5G1HmUBylrFlgnSbAPmJAY9qJkR4uCkgMHSA9kVlKAhuRIa\n6a8qtUn9Z9i/Q1geqToYvNiSKQCWBle5CvAVRopiu7186DSzhQ7ActuijSxB\nnjoMzFV8HAF5hN01lgQ8zgtNrDr995N803DM5foirl+n59btANLqhfsdqQyf\nJCIbXy3aQdwg/LSPIJa3c4jS/gLYNzaDGuhZkqvBXS9VDaPuZu9AHtyFNJ0I\nI/QureQj2taHFSTD3PuBI21P+H4XO2YZWOEd+VavYoZVlISMI/6L3rWzdj3Q\nWBynuwVPVe5lkFANMmBvktSbvXyAvUKDJBcoz0ps2tQ0eQ9qLCtOmRqe5rig\nFkh2pTgRGHY9452Xl/Nht09v9RgN4bUA6Subqfh8Od8TQmn2hvXUTr5eyrBe\n8uQ9\r\n=6aHt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.265c7297_1546516959516_0.1407327968987313","host":"s3://npm-registry-packages"}},"1.8.0-alpha.1208b18a":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.1208b18a","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.1208b18a","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"45d5ff1e780b329ec4e771b8e0fdf7f6d2d16ecf","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.1208b18a.tgz","fileCount":9,"integrity":"sha512-EmLS02fbHcyX+2VYFXwO3WXOxNDQ7EemgODdMMtt7IaXkWSXn4dNuNGKz68kjSArjKqwAEJq/+dUje2sYjFrCA==","signatures":[{"sig":"MEYCIQCJSpLIGN7F9DRXt1tzFNRRW1AtgqROTMlq32oqsNvM/AIhAOzaJf+ei6BOEkXozhznDX16qEHDILfvjK3UfLKegKgT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLfqLCRA9TVsSAnZWagAAzi0P/3q/rUiuk+9e9DmebGTj\njQ/jl/qv9Bxq8GpyAnRzDVjznoMHD8udSR1KNeY0LnZHHIND6TlgJdDY0Mu4\nHRKAqIhS60viowHjIaOWfT1XeX+E+4/Msn3vmyRR3T8jlWqLmOypB7EorU5r\nrWzDv/Qsj65XOGoWd47/dDf8zFZOw4Vzr1mgcbz3S6X0JpP9oQwoATl8gsax\naUBfR4fxn3Oij6sW/SBrBHi5lwoyDEFnK9nCwSsJNSQI7tdkIFjB4j7dpCyt\np8nIO+Y6jtXWDYbDRLYcJmgBtWTyESSCc000RalykoYs6FP8kINwSYYn6TyD\n2Uopsc2zZQDz7121oAfcm06Uv+S4paevq3lQapmoViAeydB6/7RC3y6AjC8p\nJL7vNBJJhfLW8mbR+DGdXJ2AjN1i5TmxcblyoeoP0eA6mOv4PNW8OwMQ4NB8\nuUflEJTki99KotlCs48NzN92kinYheho6wJnh8BqGn0CPLt2hA9bGPSn4cNl\nJQqrKPaYTpOkLOTmZAvEQ/ouV/fM5kgM0TdkXscvyiBfJDKokCE4QpGw0sTl\nEDGEZO/X9Z7ZIk5f3qiQIueJFFM09Xpb15TTgvOoeiRIYQywi4B2AAqqBsJL\n7PX9JFIAjN3Ff5TB1ifG6iwhN/v+AYJav7B0HS/8vuV+AplrYtk0IGLAUQlj\nTsrC\r\n=lYXZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"6.0.1","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.1.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.1208b18a_1546517131226_0.39388205423930733","host":"s3://npm-registry-packages"}},"1.8.0-alpha.43e5a9a6":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.43e5a9a6","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.43e5a9a6","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"3d5a475f84ab770171b5f473057a8fa0a442bb35","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.43e5a9a6.tgz","fileCount":9,"integrity":"sha512-M9wN6do2HNkJydPiRTjWN1KbfYZJUfOk/TdmE+VE4iOsK9nJfOYF9KxEx9n6q9B92hEv3kMiv6cHeZNdF6HDwg==","signatures":[{"sig":"MEQCIGuWpxBlwdI1BzOmRGt05Lzr1sjVPCx46SFIhiq3VwfVAiAYDu3CxOhXaNJ/+O62d5ZFqERz9HrE8pVqoTtKO5+6WQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLgghCRA9TVsSAnZWagAA73QQAJNL0o1dDjKUirNvfLkG\nVxONLQ7Klglr34EBAqax5isfs8T1mNJdbA5Qk+R4kD704O7+dyZrhhilW57J\nh+99VkNSWMwuKM9xBom92KQ4qMd0xbv7HTFT9HJ8OWiuFiL/usyPdZ+r2reE\nlDMZNZZDXMmPczTOtKW4+k7/1j9RVNUlGlxB6EAIGPywnkHfeM93PhMzU6HM\nEUcFgff5DQixNedaYgJKomkCGP/d+kCA9omQWp0DDLVFYzJb90UHy7qsJQE6\nkv0Q0xV1i/ONwNVF9+zm5SfgA5Fpn64Q0WlbWKjv6lvZEOmJyrr6og+AxjIG\nmPqZsJScFeVL0idkZy/t9EwMKzoiD63q1S2vlwxP0ZYh2ZCF6L7nhkIjRZQw\nMj6IIFlox643rO9B0zN5bmU5kmTi/40SFcF8Fp+rWh5W1mLQ9SACgXLXDUTR\nlu099Vcv7kSqzy8KyKX0HC5BaFbdWaSs64QGS0scqhpVkcJ+R3Zw59j6de0m\n6R1K1CPBtA/BGPQInLIyfsgAFA0WHto+LZN5tnqSPocewrAE0eAfyhTnoXuB\nCJ/JtWzM8FTiTRORh4CPtxlqP4MhGAJKtyZesSm3VAKxLvSPy3Ju13q/oiOJ\n7vuCIi/hzsNx+IoEyOYTHzZKDKoHi6Z0kAkzH8JmZnQ+d2wfJaPZiQVYPN2g\njYKQ\r\n=nGKB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.43e5a9a6_1546520609116_0.8184795886093852","host":"s3://npm-registry-packages"}},"1.8.0-alpha.4336d68f":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.4336d68f","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.4336d68f","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"76d45be4d2bfe04adfaabdb10dd4d0a6d333770e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.4336d68f.tgz","fileCount":9,"integrity":"sha512-T7a2Onr9iOSRk3sbMZl9eqi/FQ+sV/Qh03RJpYqKKOTSa/rGEBrzIqF5wHD6Uy0+lgIaTgv2CXM1oyA8k2prYA==","signatures":[{"sig":"MEUCIQCIKaPTqzR+9HeTQeC3VLZJFmih0HhMmcVlyRXSQZcNiQIgG12vAsjaLtK0mhvpsXOGHZ94Cf3pPUr+W76peqS9NLA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLgo7CRA9TVsSAnZWagAALPkP/Rpw9UXTJgn59/1Byicn\nevOj/ectPyGlu3f2rzpW14QHPE6ORwycw4IxeSLsaokHhoAQbhyElZAsRQmf\nAVGD8R/S0uSOyISVSp65Tps6xEC3OZbajnoyQ1qcGRkT+YjGBkzLCnKcWR6M\nEPq771Fk6M4OG1NpPkB6c4bWkSc+H2ykz6/9oV/HoLETKLsdWyOiaLzj2TKg\nMHMpfZrAvXxvDEK+MLxHam44fygIAXCpIaqaoHMLNaWG4JzQA/u6rTLpDAxS\nYFqksDGFpS2XNkS2LhAU8KQsSTbUay3uveVAyXhfqA/BmUAxMsSBAyzdHAie\nB8KgSd6SbreuuhnU3xCqvhj3dw9Ed2rcRydti5XHI24fVdGygup2RNcFBFV1\nRHeLV060GNVDth6zr7fa2igl6unpBcK7jGNEVKsQW0x/SJRFcTq/aUsUOdm9\nvxiRTcE7RTAKla3UdHg1jFU58Z5oQ4TiLJJBGJTmy1xr7o3AO8JtpInzjMrV\n7etMQsel+uWsz2FlqXGl+uXNXyiRt45hIqC2HxETNIqwzNFU9QE4zc/Jmgj8\nClK2HfJ3+RulljWa2T5JxudlHAI0qG+k2I5ptoSETMy58bgVpHB1JEFLSlt/\nDApzi5URBSiYw5Mguyjwe5CTFH5P4DMr0TWllqTbv8ptW/N+V2yd5M+9UYC1\nnHSb\r\n=VmA/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.4336d68f_1546521146338_0.3409795427663034","host":"s3://npm-registry-packages"}},"1.8.0-alpha.7ddb2824":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.7ddb2824","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.7ddb2824","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"2e4ac075e15c5ba0d7603c04e9233337818257ed","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.7ddb2824.tgz","fileCount":9,"integrity":"sha512-oVrhOLRPu/4YJrmD3E3H+q6nTroDRQYYjR2kg/v5MZ3kPJGiyX2mYGkzfxAKS1QGqVG/x4mr26GXxI9Aqpc2gA==","signatures":[{"sig":"MEUCIDciIafcaWpNSsHcInRfP6NJizFe7k3aTIja64lw4WAkAiEAnDA2FGhzADxo3CiJ8zsuIGHM+ujX0dxCG2RDK6QnDQE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLigiCRA9TVsSAnZWagAAytsP/3u/YDtnpkALqENTdNwH\nDTDPd48L4RMzGeuNtQGySVWGhY/Tv+wLbV5Aijt0pJPZEY5blp0fy+oov/p1\n9RQUfx3CAZuk3n3MvOdq2Jaw0p0g5OwLpjt7xCPcxSYDh87p//MxVV1w3Mlv\n/UhA9BjhpIbyw9QovbwAgWk1+cU7kR6nozf83iuzW6agnkb9evTQ6S3UQb+E\nDbDO+gPA5NzWyDwINKppobo1y20c2TnJ2jppzzId3WGIHoMQTCtxe/awKZEV\npNJAlmONra+0P1Xc3hehDt8II8yqjlyoabbLsyG54llJCnUi4P5l0wi3bAnv\n848hmzACkyRk4i/fGxqDfPm9Ohh5YgQMlFEQ/75/2nk12WT85z54s7fLLkIT\nNaVYhMOFnwlhFGkp0u5ommq/9bxSQYhUeHHeoX9q4pKJiU19dewC/P/tQmly\nYJuP4E0HowEr0IhpQQKE768rZNGDc9sPzcux81MyKrTraIiCpbWjo9W3zeh1\nM0rjXw0csnnmGtKwQg2zMekleaHrFjG2jAbmyVXRHgxe8YYSF8lGQDPpo3sF\nU/iP3YAQ55cVy5szHmJZWAfmH/0/lILaHgpCUx1d6TFhkZXgYeeXEUfR9Hsn\nFjUeZC5QknbXeX/Fw7rIE7FzXk1tsEPuXWaceS8zNThWgWeYKtJr6ErRzbvw\npzlq\r\n=scKu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.7ddb2824_1546528801426_0.2899208620120459","host":"s3://npm-registry-packages"}},"1.8.0-alpha.9bab6032":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.9bab6032","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.9bab6032","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"6081a13cda0e65b6a6b1ce6132f3fabc15ebb732","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.9bab6032.tgz","fileCount":9,"integrity":"sha512-yoq/pVpjrxJvlzbop4tDe90kxdZa1VL2t/A00CKnlsTbmuZJM9M5DXxn8+9S1XYrZjjEzm9c2VWKayWH/hEn8Q==","signatures":[{"sig":"MEYCIQDeB3cP/bk5xzm5uySGeAVqOAEdNSbTMl4R0s9wmWmXBgIhAN4teLlkv9ycHpUUKjwguckEILnCP6HrHAEM8wVkufLO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLiuXCRA9TVsSAnZWagAAZ9EP/RQ8rmKtNa8WZimEaoSz\nV58XvzouMWU37SfiDEKwznH1BrFcr7//poXpiYmuhDX1vSvv7IRNZ9h8nqWl\ns4EEqV1wOEYrT7zZJAQZpdJvntKvQH50xqACmws5kki9EYgBnlST/J9sYFxL\nY5+3A1BmY1ve3b8jmxMARGe9QuW9Y0/qNNUUUEJAe5P0BxTuIuk5I4aRIr3r\nmNMOp0F4CkqssnHd2ydHmRhZ5PI2KXARQV2bUosg9hS+xPxXka58rHK76WB4\nDXZpSuvPu0GugBXxWzbdKbASYXou9zcSkr6xogvRx3mUuN7fs5V+8g4vHFV3\nZ1uYv0c8JIj/8+35r6UPggZSY95hEizm5PohVG1YN/JpcfSbSwNbr1YY8PzE\nGBb+N8Pcc41Tj2DWJgWVYTPiQDK8u6+N1ObzLtZewsrrPWaVFQ9tEf34AdZT\nzD9YML/VpeIrK0CKIHJr1nR6PRizC0hYKMn3gGL/+TAQWLcMXmLSGouoFdMy\nIoQU79m9TZO8K5mOFJcLFClkQYElhVT0xQilqSyuPECq+RaLPIcyqysKqWQ3\nt9Kz0YCrQlO9IpRUqT7rv50M7T5ysauX2FGiRklVXuTW5/Vk6b+X4iN/Hu4j\nViVdo9uFR2B56kJetK3QZ8pVCrbTU3qU1Lc3Y9abcaJCEcMS5g9/7qijdre/\ndQ+j\r\n=onCu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.9bab6032_1546529686786_0.4994132907407245","host":"s3://npm-registry-packages"}},"1.7.1-beta.49":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.1-beta.49","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.1-beta.49","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"03e58fcb451c83afd5222b194e1412b6f8ccbd0e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.1-beta.49.tgz","fileCount":9,"integrity":"sha512-qmXEt8jnBqIoK+OwJLP7dRK2mqu1HM46kfsXiQgo22gyK1ahwAbXJrQqXY2Pdg50FgSDyDcZuy8CAfaXN2deAA==","signatures":[{"sig":"MEQCIAWjZflB5W4xJzFHzhPQOuWYZXRVva0oX5rXYS74SqGZAiAYe3WH+NODh8QDV4P/ccElvqr1l1KF2ryW4IPaGJA/lA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNc17CRA9TVsSAnZWagAA4MgP/iJ/+MM/VKNMp8u+JsOn\nQT36vf4ep6DlgIzAv+/GUobLcafKYVxgG0AyqBI8Nar2L/rXzOswDK/HD+I0\nhJng38HyYgcbKn4ZB55El0m/eexK1QNBukz8OskasRjbtg3MEWdWJ7IeggdK\nbzrzxgS+7hlTSLvPUKMQ9igd5W0u1JyeiTuzMkg5Cs3pOhhzftmjN81xRUxH\n44phQje38bNMfmkbXbnurLbOng297aQuhC4V2D2i/3BHbHfEhsEEAnMrw7rG\ncm2cenpj0vFrnR/EAdu+DOKTMsjyJr3qil9+X64227OhD8EH/kPuDmqnQDeh\n+4rhOcE/ox4CoxcFlWyKxChVnwiR3JfcM8EwQzWLWD1DPdx1oeBbDIkJalkh\nVEIICVRUs57WTnl0v2SYORFHqM1XMigkm+3YxFazpEXvLhdWTzL8iesfXvra\nsNY6Z05wmR9NxL0sWrM0vEmFN+WWAPr/mhS82LLsaw1JAna1JRZfQ9LJGebt\nI3FWOM6YcM+7/0NbJXBry89hICZ8wo/elkIiRmVQBLURpWKzkX4Rozv5Pgyx\ndkdCzWFKTzU3aMqlSaXjSb2eNLiNT3rCyjcjsARNN5Pdn1oWONw3SbDngOLT\nOr4ZtCH51QCw1v3H2Dxl37LyRqMKpe5KpvRQMveQFc5oyCPU4MgyMeV/96cU\n89tL\r\n=K+YM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","gitHead":"8ea29c5385135c678eaa7fc954446b034c45eefd","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"lerna/3.10.1/node@v10.15.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"10.15.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.1-beta.49_1547029882957_0.5712957159474776","host":"s3://npm-registry-packages"}},"1.8.0-alpha.8ac3267f":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.8ac3267f","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.8ac3267f","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"638f54c32282d4fd09a2b0b817830fb20ca0ddae","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.8ac3267f.tgz","fileCount":9,"integrity":"sha512-22sdvMp3V7+M54T9AGfePbL/CZzbV0aiTLTmqUpwd0W6EdrUK+1WTuO+yFQu15qmV6JJGgmfvxPl3wDQPt5GOg==","signatures":[{"sig":"MEYCIQD7IZIaZsc6bEeBOM0+azBZnlCMxpOBnAXjaJBiVfBhrgIhAKDXn6ctcHFehh2sU3gxdvp/LPKfWvaSsotQK+d/6i83","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNehPCRA9TVsSAnZWagAAj80P/1eeLYnZr/kLa+witMlh\nLBTGl9xhlu/LxuZ4YN1BtnGYbtL+jXDhlMsVTBT26hcmsq/KAyRBNOlXjRN+\nhCRoAm36eMGB6mU5U37fZEAnkIyMQqXDsLP4WS35Gfv0n70UxAjcvQDJ1qDK\n3x+RLPFPPzen2iEqc/PbsRPIh3QxZENA7YckajccJPNF2jaW0H1tT6IuwcCp\nM6WQC9yXrWHXSX7buiqmzmmFOAqoqKQOahz9hNmWLDcK62Q72Jm72h/3Z1FU\n6+xq4ZZG7zZ68F5Ten3RLLHpe/dSu3laLUyRhv54BuxgoX6qCrqbcIx73V4O\nReYRWpD9X3twJvbavT3gxIdFce1pIqHPyU0NQHP5fuAJ3t6mYpGXZP8utLC9\nRw06eqprD3cM+z03/fx46eOYj4DIJjWzO+lBkDxUMYkzxwzBqXAWx3MB24IA\nZeoz/Z0zQgFPNfbkdEpEM9NJgixVXxtKk9VHLex9+LxULnNLJFihQtB4krPS\nyT5txxLIfoW6g3RsI5E2OciizUe/kdhoEVyQG7eWiYR7t9kGv75jZWKtBltL\n6KPSsqIi6VG0RvMzqNqkgJ0o9PcMtH9yIe7y2qp6Pqou1dezd3jRxC6yY3N9\nQFikLKF5TZEr6IRuD6IreWVy2GBEKrmryTiYx91evaaRGOuUtJcYSAwMDj+T\nuY1m\r\n=jc+c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.4.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.10.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.8ac3267f_1547036751246_0.017797639961600664","host":"s3://npm-registry-packages"}},"1.7.1-alpha.47":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.1-alpha.47","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.1-alpha.47","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"53db02483218b1c5c60732066573d499a932a905","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.1-alpha.47.tgz","fileCount":9,"integrity":"sha512-G8G8cy0eFvo8ukVopV6FWxfO76HLS38SetbwLCMMYnENgO/eTrl0i0CgOiEZ/V60PelJ5gthq3nqiyJAPRd+fw==","signatures":[{"sig":"MEUCIQDAGpwMLj9Gvz/YbenYUCt/iCk7EasyjHWefYAwA5j5RgIgeeZ8M92uQltgweHkzpMteXpaRYdODxSOdk9Gq2iQbXc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcPH9bCRA9TVsSAnZWagAA8kUQAIMVZWlHZIOt9Kuw79W4\nJlYNAh2331vbZDxaB6T1OvXcI6itY7FvB6fwYq7Rl5X5PVks2KskEEHUzk7e\nAGr8KdsTWFmGD7TXpVhKUQ8omsphczTQK0VVhfM0IA2M52leZBVwRtZ7ZlcE\n6tSLJC1ArMk5m8UsXmyNl0FNgCU/b4hwcpAuHmJ8vxH/JA65+mY3SVRZnPgF\nzxULE1Phvm830xdW+kgMq7lPyIWD0Szf6PzU/5gDVzF+4gP3KfpJY4maCjQN\nhYGFv1tMxyclZMB+8plcRS0aNnxdS5I/47DcqSuKlw9Xe/90/bBCJnADvVOI\ngVoeML4tkg47ThvgGVQ/hMbt+RjESkB6+4rW+vD4ZbYjdbPxH8aTDsASwBaf\nCxQyQlMptiIUAKyxaonHLrtsxGd+ycKW7dwl8hP46gXqy2BTJAl1JAfQv8GG\nRse1VNWZLaoFRQbjIIcTosIBegGLh4K/f+2LPQZMaEcWRMcdk/64ZkrjpUG6\nvfa1XCtPBcVOv/Yj7qk2Cz139ppOXk3nulmzR4fRGwX5lFMNLpgXWClbcfJp\nifDBzA90b0h3epMzrrN7Yt3nDUp6kwx/p9y0WxiQ6otjZbc4dDkdk8RTb9N/\nWbhAmfVP5V2UtpcEjykQDMw+xVK4FZRkt7g8mPeRjWhjsbutSANC8yoJQSxQ\noxb3\r\n=18D2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","gitHead":"03148e64bee3804da31b842aabb9351d5fe93db3","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"lerna/3.10.1/node@v10.15.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"10.15.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.1-alpha.47_1547468634825_0.2706672352867865","host":"s3://npm-registry-packages"}},"1.8.0-alpha.025488c5":{"name":"@cnbritain/merlin-www-js-utils","version":"1.8.0-alpha.025488c5","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.8.0-alpha.025488c5","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"407fee65ef5abe35d0e38c5733af3e304571914b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.8.0-alpha.025488c5.tgz","fileCount":9,"integrity":"sha512-lRcdsBeBATzAlNRcIDXxN6BOZ6occ+0DBEyXh//IB2NAk4pWaAUOfFU4Q4EuwXTcmoVm6iuDDi9e2tfeqf6A4g==","signatures":[{"sig":"MEYCIQDV2KA55CBgtfQII8/37daM/mJQ6djurPMA8ujboOOJ+gIhAMog9NHBpRN4j+kA21Fr3txqPP/ejSWwHICiDOQl1rxY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXWJfCRA9TVsSAnZWagAAGrcP/14HTLwbnARPF51W6vgd\nZ7/lWefOeovUUMYlOxyzs9+r4HZx+3tUA5xlVhgp3eX/3/i8RSYM5/RIADsw\npID4E+mHPYY1mADjjj0IFiZA//3zzp8YvRFwwLTn4s2u7viTuSmabX1vs3mi\nTfl9jnZCycQPO48VY25m7Ev9e9XtNPtpMuGHuTqUoBZ8MtGiE12zNh8Uifbt\nOhkT32qHm3kywtzr3uLYCsue9Ky2NT8gwtA90GVluOID+k+03m/1XAJhBXJ+\nzRE7pY5lpPYZhJOq+RjvjYxY/O2QlyX1kdAHtHYff0Q5PxJbiTTbHnPIIthQ\nEWZqW9dOB4AUvL8t/YfV16tqhvLVXWwDW60Zdw4aVEM5bgK33HTkyOXLU0dc\nR10j/BrjDyc60bwrVzHCmKc4k9PY4r+0rN/TY3qz6pk8ABAmESI38+15E8sl\nZOWssB9k3v23gN/mamQJMYOKehxcTKRCw9x2xmlXggzxbg8Fz6GxEFeWcqDw\ndsQD/6AaUp/SQm/UpIois6EA1uUA7cHUyD5W92f6axv99a39hijoO5D8YgVl\nwLS8Q+C8tWSPV8zIQlyocqiTcI597zD5tzCDoKkA9VxkWECoovAqYiPhIOU5\nvvKWCVjzbtAQQ121DTCaielDWZkfEXnM/DhZkvvicy4/4q39x/8fvtbmERA2\nX+lW\r\n=irEv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},"_npmVersion":"6.7.0","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"8.15.0","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.8.0-alpha.025488c5_1549623902842_0.6420236868855165","host":"s3://npm-registry-packages"}},"1.7.1-alpha.118":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.1-alpha.118","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.1-alpha.118","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"7db30fa3cdc16a5468bee542e03b33728c747e5b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.1-alpha.118.tgz","fileCount":9,"integrity":"sha512-ot/0ryabIUml5yRoj5YTLG5WZmKxtJoBJdFoCH133PtrUNDH68tNIxFWwNgjnOEL4bIg5gYNCidFRzr6DNN2cw==","signatures":[{"sig":"MEUCIQD347U2Ck/Dftg4n+rceUKkgScwgVbbowskYeEHyb40KwIgdMvf2DwsGaXqJyVOEKHxjEqFA7OrMM97BgsSGsndpEs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67612,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/OzuCRA9TVsSAnZWagAAJwoQAIEPUnXKXyEnSlLJlo2l\neQmqrHSORC0cy2sc5e1g//5gB5Wj5+AsnJT2pzpcfDK+oNvvV8RVsZzvs3ly\n/gAh60+p+R9ZRQZW9SJFK3eq1TbOI4hxJc9x4HFIv8KpNufcrJ2ruFA7tOrC\n6voAELPx5apy3FxUZUVVg/m1O+l8y1ZES/Zkepq5mj16Q+BIjxBeJd2C7Qas\nB9r2C+0BtApSLrRDUOscHSEhpq80YiIUjObaF43Gkg6Reycz9kK3iLPVWCh1\n1hhgwnpix+P2XJOIPPhDW371vGLlOjaXdt6fg1ykGNsYfdBO0LxtraD9ZnYL\nsCbOYVdQE25Hv7vreLH3zt7FFlcCScju2ImGUGaG4NFgNwoASXek4A5a0oNm\npbedP870QM1a+f2XIIgJjQ6ewgpUSVf8KVNmkDFPh3kYx48rehNmli9fgqIL\ndnuNCE7pLnzE3KCoubHP9pfwEdKll/QdUUOoBBHYf3T2o5aFqP2YQ8xp/fi0\npnKYs5vT5uYeeY5porrbfipVUYbeCLiwEjFUKdRq8uMJJuYakqJqeCkmv7Ue\nUzv79cQwse43E7Isa+AjAg093l39suVgqr5ZWGaZwloOwpOHSpCJfgHPo33R\n/ud8hmumLG15rXM27ei5ZXsSrB8aDYW+PTUD/hgqqwhZ9+N5YA6jApC3s8fK\nvWXa\r\n=zvfh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","gitHead":"81cc463bc2a738b0abec1c8bec5bc33f4d86fc20","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.1-alpha.118_1576856813665_0.09178493548957523","host":"s3://npm-registry-packages"}},"1.7.1-alpha.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.7.1-alpha.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.7.1-alpha.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"5a3b714f9279576191c58342f940e8d32b178e85","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.7.1-alpha.0.tgz","fileCount":9,"integrity":"sha512-Kmmz0TvTSX4lRG2PJ+Suj0JdaI3B6v43g5OuzfXUHqL9kvE7b7P73SBZus/h+BXsPU1ySSTapHNRLQrdi1r2yA==","signatures":[{"sig":"MEUCIGb9hCSgyS/KB68c8tECGXoF17LOvx0AmXDB8vn5xM43AiEAtEP8tu3gE7CE9bMVZf5TpmeorD4lZM7QTzKDSFcUV1c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/PSbCRA9TVsSAnZWagAA72UP/AzNnFUCd3os0z0m3+AS\n1LsSNCTYUL14weuph4ddIs/HLelTCIRSxSz0yq7R+ilk/daJeeDd38U1H8oO\nOhSPNyTEaoh3mzWmL88qSPNHyM3Fkccckv4Rh59C1GFBJVyNikcAHZ33WNBE\n4sHOsISb8Y0/6gSrr55AAjLh4m5+7z0FFxMj6Pq6fRFsN86Y2Nj//b9ITuAY\nwjUwWDFfLrxI+rrHRlr887/zOaP7itbyZSkO4sHJYvEiEbFayWWAauDoJQXZ\nEzHkGppX2BdFxEv8ip5J1/SURaEgWQmcu+Khnx9nAzGd2eP8/hYqj0rKdWBg\nRmKbSnbUudGO3X7NU5ljiiECXeeRXGTjosxGLHf/OfeOhKSfofFln8Gc94Sa\nvxHES4RZUdktDaUOqrXYA1r+IlezFSQKp8KBh8QYYzPNuC/3d3vHd4LDsAum\nUADOi+MdRHjT/9GS9Exwm3J/BfqahZQKSpJSly696yVhHeHTGx/a6iw0M9Fy\n6TqAxrPCVvFE8k+0OYqU14Xe4+2QTHYnn0JrHmaNOVwkICubGU32uslaUMKb\n0zBrSmJ2+3WfMvGRzH3XAA7Cb8jqoSTeiALP2nJ/BSMQx7Cv0+fZ19pR3evW\nLtvc8y2r2j8laQx6W0+A8O2HFFWRm0JlwMGvYBIm49Htly3YC9egKuNZdC/Z\nF6DB\r\n=evSE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"a2f68b2c773201ae6d12dd324ba141c9b1bba8c0","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"lerna/3.19.0/node@v10.15.3+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"10.15.3","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.7.1-alpha.0_1576858778987_0.42019004075710664","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.9.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.9.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"328dc18c01d753bda492809764d8ca20bd251f55","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.9.0.tgz","fileCount":9,"integrity":"sha512-95XUKXcMWFqdAyDgYaukQwJHMqFF1Jx7GeV1badrxBJvyJzYWYKMiImeqNI5QJ/2NXwR7DJ8ATCrvq3CPJwqjQ==","signatures":[{"sig":"MEUCIQCattEKkfkY8LChujTNu8uR27PUPD8o3pq7pZhahhCOqAIgM6K/iCQ0v6BV1DOCXE2Qi3Q0RjQyCx8ggM21QsR3yrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67592,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeBdvICRA9TVsSAnZWagAAEmwP/jqaYD0+3Zf4Ugrcu0Xp\nX9wjipP8BdxUUuqeeL3Qg8mThirC9mWusXFI7twDoAxJ3As/Amreynhodbf9\n5Vq1/u04at3gePaXVqujII483qMbr3E1yJNvAYAMMOb7jYZs+PcZVP1mgxpS\nC6IFRcN4zmToaDvMozHdtDnDXoqE3hIFlspRt6ZeUQl17eGnwqrTXwoRmIml\nIf7NMCz9jSedC+bol2DZ0xymzOKpI+bXmUcgTLTBsJFplvP5b5C9/9OBgcH9\nJzCI/jvsXTcPxkYEZ1fM0jfqTj1iUFqnKlLCJtS+dEzlwoQ2KhzUYAKPhYHD\njrtrpNfPwW0Ug/6yh2EbYw7243vSArtlHnrSEoDj2paS3rmkg70H9VJkW70O\nCyb1X3uU81aiMqnVyCy1XVVYPHi2aFkCEp6EYxuSgRlTlIZMkyOtjDpURZN6\nqiki0dzSo6yYCfz4rsaKz72yGLbYuO1wsT1ZNz3u+59VHWgBW/qDV1siNVHe\n65dBzH9LkhJwMb4cQCgpUyIWAfWrP+hPzbQewgUeQXElBebfbUR2HBv62oOC\nHS9P7VJBDvbQEL+HmhQCXd6pwnWrTlVzflUq9i3+kgoCJHRDouVGeOaXprko\nF0BF981qzGDWevweAFd8tsu2UD4IohYgovjgz8WyoKGrk9AZLQwIi8p/gPbh\nCItA\r\n=GLqR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"93ac95c9fefbd1025868f4d1d849ed6991236296","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},"_npmVersion":"lerna/3.19.0/node@v10.15.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"10.15.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.9.0_1577442248196_0.15451268457568457","host":"s3://npm-registry-packages"}},"1.9.6":{"name":"@cnbritain/merlin-www-js-utils","version":"1.9.6","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.9.6","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ed1961e95ba2c4da92984fffc0c2e57191bf03d4","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.9.6.tgz","fileCount":9,"integrity":"sha512-iIbLw8zFDjUsUhDb0GcJAz/ck1WbdY/MaTonTAcW5/UAMMxyBwv1kg5DrVWeA9zfC2kxYlFXEpohOkZV/R/+Og==","signatures":[{"sig":"MEQCICz/gl9hM1jsXAsXg8OGY2X1ze/BiZc4iQKdhTW3fATLAiBaFUYhNq6Q1xHHlMffa59vTAIxAtS7nDO8fHB7zQs0ug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesZkVCRA9TVsSAnZWagAA1SkP/1flXNtEzfy590xW8njA\nj4qJpXpOtIBZVZDEIiOK6UA0DMXEhfZuX6Y5dqYBZdKis7QGu1/jStx8MVFv\niYW/LQn3Iupk5/ZfMqH1DVVLtTer+N3Lf14njtmAgvmKo03QeV9Ws4BIEi0Q\nrYpuXO3J5yuQ/2cih0mqpcvSh5RK7p1XtIH1ourObPOXDewd5+TGAWZdakTN\nIEPseh2I/2iJFmhkl9rxGwrdqZZHFWjm0eocX23BZUQE0pBWaAVZu7Os3ajj\nNpjd0jRK24qVt1BWRIRNjQfXcbFZCuANlW+apk/Thfn+hcmhvxHX3HURp4oe\nuKlh4fJM/CN2JPSlLnQZlfVHK5JlYIiyoHmspeu2VfGqjiWXPWk2ZsWYvpdl\naPpm8x+mpdsaalhF6AW3rRajSu3dd+0RIzCclV5X6c5uZvzPZaMCcOvKdqzl\nhLZ+/qMcH4hPxUBWo1NN/00uBLSGbcO2TEK6dh2XakgbNYgckPwyljueHiCP\n5w1N3bRqax6uKcbtKf5q1zNcAl8nf6C+xsItbKuSQjPcGcxBSx9LHfAtMIay\nABZsN0S3zU+7CYM8iWO+xQyurWsmLkAk1YEmuEya1HkOLCd4i0Rh/9cFlxIi\n0ru62mgfaG3ZFUT1k0ySyk4IEGx4eZ38oGi4eGUKeiNBzqp2car5IPabN8Gr\n64yZ\r\n=y1dN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"26bde18766a2296e4c60c12434cc8babe3e3e579","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.20.2/node@v12.16.3+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"12.16.3","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.9.6_1588697364424_0.2813114405410837","host":"s3://npm-registry-packages"}},"1.9.7":{"name":"@cnbritain/merlin-www-js-utils","version":"1.9.7","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.9.7","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"0332ac43e3255bfcebb54aacf93e87826a302670","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.9.7.tgz","fileCount":9,"integrity":"sha512-PZ/RW+5wYqLF872CVvg2VeAllw4eAOkqGzBweZh9MF5ZWgQCVFFTPSgOGpI/etgcN9GDApebXEC8HPYnv83RVA==","signatures":[{"sig":"MEUCIQDw+vv21cMr89ha9XBe8i43BQMXl50Dp8A3D7klNpbJfgIgEryGbgb6p29wqKaUrcwgJceBdqoZi7H0nZdVEadIilI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesZrhCRA9TVsSAnZWagAAVgUP/j5XEqUUYR7YAOiH43cR\n90eli+awEfl3g5p+1Jyg3p0I/o9uDMdgijK2AsWLNg6coVq/B19Y/p+HNsMM\n/7pm0L6nUdHC/ZOdhHjU5Cs6EVitFeKMwYkSsvq0NgudsTrsL+P+hI4JV1sn\nKsA+iGF/Qhza60ALVLcFU4VDjQwYqgoNgjnNZxCLizxICmbZa+fFSpdY4Coa\nvgk0EJJKS4Kf+j0tt3B0hx4ZgF4F3eVGpTZ1mvD+vtjWpIqOVmrv64kCBvUP\nDyzLHnlJR3hP1vJ4jbdj7xCGc1kvRUE4xW9o+C4Ya8ozKV26xb2Jab4NGFfg\nrvvgZUlVtngo35xG8F1lSJNdhFmlRuGdRkf1OLuahA5pCDAcQGQRikXHiHCj\n/KhnGeP1wmneL4KA6bKDj20ftUuSX7XhIIBK9Ra/WZqhmDLG8S9mpXblJ1QY\nYW90QjQRQETgU9/T2EDrkHPs809J6eG/sPovICqvmShCRRUqWvWIEPkuWwRB\n9ruVkgGY4g8mM3UUvXZTYflMYkl/WaDqbmN6Ck3IOfRsdnzVPDtZzzYDgavh\nAKrMDFFlhbid4688bimlwAMX6DDIkszVSlUPGyaqC2wZQr/y9Cg1AK9T83w5\ncM28oNMiCXLDm1hhWWacjqFIZTkPzzCXms2ru6lQSN2H/UoP/fWs4xXdiL4y\n4Nxa\r\n=o/pj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"84311537d5d20eeae9fd7097dad8bb0e8dec31ab","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.20.2/node@v12.16.3+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"12.16.3","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.9.7_1588697824469_0.8205624853135858","host":"s3://npm-registry-packages"}},"1.9.8":{"name":"@cnbritain/merlin-www-js-utils","version":"1.9.8","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.9.8","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"ddaf4d26ac4e518bcfd9e557cfc53d53c52b833b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.9.8.tgz","fileCount":9,"integrity":"sha512-7IL7UEJ5zhoepnN8ou5BGMRarFPv1aRutJocEOOROm6bUqsSIi5RLHYUPJt8j+tnHXTjk0PfYtrLxBoE9zKl3A==","signatures":[{"sig":"MEQCIC4+CBcRfgghRd07OuNe0xeyWcFqsRNnqbQrcImDiqX2AiBE/58w2jHNcrFH3Wg+V8SYMxW7NZnX6pchOSn8Fcyz+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesZwFCRA9TVsSAnZWagAAfNgP/jFOMYeqNk3865z9UMze\nSn2fpHa0Biuz5OIINgwhRjrkAAVt0kiHSSV9bESQQatVLT6BtQ/qbaj2bmqF\nczEuo2I/ZjE3O6mAl3cx7gcQX1AfJW8hOyf1peBcyK8aOo0wFU+RdoW+qr9q\nGNgNn73xP+d7C76bDtb2G0NYy3unCQKSIJKCq/BHNHUhxQxne10tT+rO3LXu\nIDFF1bTHxD8xi+T0Ea4Ep2tc+C0AAVUZg2Uftk4SEcmAUji71dM/WyrhkyI7\nnOCDVUgA9+KXcdgwNDRbnu/9DdkT7WRzVKJg2/5gM1xJOpG4e9Rawa2eNBtl\ny9yBIcABxW0y547YmPULygIdZHsSj3idDVq1fhRxcMrMqk6pmanNJQsSZugD\nMEeKnWNvcCfwGL1xvWRW6L30Zb3E3jxjgXIYCQQLushUmyrjbZwC2P05H4Lw\n2FNlaLGcbTbLtu5VZdiXUYWnbnG0eOA8F+30rpnpTszG06jWw1YbE4+XF+tv\nJi4JeRlOyyifnxI0H4+HmG98KbZFR+9szkDej9nCByidiWi76V0pyIBfDDdX\nZN7Od6W2oGhmICLgFQkLZOdSUrcgWvSqAX2/s7nMFwDFLmXKjS4QWbZ6eiUm\nBq9+JaW7J5/2QVDQzSArEYYds2bBeQ+FjqtFhso+W5CG66DtHXjsKcDKuXP5\nFVjT\r\n=ZX9B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"ae8f7cd6acab5588a43f2f8b0011066e8e235526","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.20.2/node@v12.16.3+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"12.16.3","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.9.8_1588698116477_0.21044566067577275","host":"s3://npm-registry-packages"}},"1.9.10":{"name":"@cnbritain/merlin-www-js-utils","version":"1.9.10","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.9.10","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"97545ac966f41a5612ad322458540c1b251ed64e","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.9.10.tgz","fileCount":9,"integrity":"sha512-EwJ08qeG+2afl7deObJSg3zquz1vaz9ai92Q6mDEzqX3FftBSxBy4YYofsG1pX3C4p6tNk9+Njp72NCPEPAOSQ==","signatures":[{"sig":"MEUCIHiDNh2xSiKSZeCw7r86t7gFXpAJivRhtWuQR53/9N68AiEApFoG2N0LobFaWxTct3Sk8tDuS7v8OjyoYw1RhgprNGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe51zoCRA9TVsSAnZWagAAAEEP/3SfJnVmnIF/pG10zTAh\nKHR04V++MVphWdAAmEtFcGNwb8fospID9VylPY7gGk4srGFhWLdsHtj7wIo5\nGnDksLIkYvvUY2FyvYJcb8s51lTk2Q2kSOlB49VQ0rKZ59w4aDCSMli9KlEF\nRM+qYfwOc4egCDx69nZiO7d+FZVNo1knZQSrXeePV5ajDuWNxkeUXCvYLiDB\n3BbinYSilVkQO4QIW7P2duzaXC9bKFzRc6ggHFqfSdi+mrMWB+Q/oPdzzNtt\nUJOv2dl9Zeo6ouNQCKuPOhzXK9SGhtk0OL9FUDEtD3p1qKUXtRwihzPsITEV\n59qV60exrtkSED9MDflEpsnT3gdjB4JZhHSBdEJIMAobxzTVxY8Cb9LaduJK\nE4zXlWFcp+i3mgI/6B7q0lYPdXY5BILkCoubnbOHVC2DW1+2Po/27/n1Apca\n9x27+vtpkP8mB0CcYMXF60ertJnjLgmiM2qHMxtVMu4Hw4r+b9tCc+9I3Fbo\nHlE2ZFjDi+5GCSQxyAi93U/eAT3aYXux7nQQX6e2hGkbFPYZ7pod0Xw7d9rp\nMAc8kMH3fCTtmzSBQSv9nuw7JjIs7pC91ineB4ceneXfPhXybI3fIkI5QAn4\n0u+kqPmJlG8/3cXum59ULrdWjUeS3PQruuktRIH9rDjlWDR2fZCJhm/KZfoV\n/vQy\r\n=UScP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"6c5795ad2643593536f340b72e866035ff71d1e4","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.0/node@v14.4.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.4.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.9.10_1592220903540_0.07784591729752122","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.10.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.10.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"b0f9c2e1b8dd2be9f13f1e7fc4cdf03c40f262cc","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.10.0.tgz","fileCount":9,"integrity":"sha512-zQj5iR7tpCb8w+3BVM/dpos2GF+mvek7KlrWxN9Wx1huY0wX4PBKPumSTJwZHWDiBsgb1FO8D0zJ3/vZxeKtBw==","signatures":[{"sig":"MEQCIHE+zq6EoDfkHpZQocrVW/2UylAQFoSEaQL6UdyXtcnRAiAMDoTCsEU0r3cYW5eIYmTpLAkvRDMxeMcUJgELD9UJeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe64d2CRA9TVsSAnZWagAAR9QQAJXAxKA9bhR1fehQilqu\nWu9rrBEh/1mRkJSwBTJ69dqQnaaLAIbKbPX28o2EVha+dJKO5pOnt8Zm9WAF\nQfpW8axh3n7es+ALNWc5h/yxxA602pPGtWdDISO4rYbA4FSLLPHdRXFRVR7O\nQKGPGUBPs+49HNG2fzBOnE0IIzevoHF7YLCUxDa/TEoMJzwgkFz0qiheDMA/\nWEEIWv/hL+Th7EORMP2tZ+K+2BRw7INNh2E7esTCs6Yic4hzhSi/HArLcPSP\nIfH102GHouO3Js97gjfAB0yIhzfzX0N9cS9HuaqHPVCLtPSsntMPoeP7C9Np\ncUpFDUshcuX8QU/ueYEAXtMp9HNJqpiYoKVFgpYxS5hN44whjIbImtSjfGCO\nI1cjNt2LVMpFgvWfRkzbY77FU60cUSBp5+4o4rI/4je1/ZFNgBqEOkBZIXmD\n4TeID4VKnUEiZT0XxbCXbNgBFjT+ikHQuyq6vBRYRdxjFna0kr6qba+wact2\nq5sYJxUMi5md5lU84w8GQ7o0yAWDEcjX5OqU6c1S5PKKqH4T2HWJfX0Vzqnb\nVMf3lxfIPf01sikUVN0oaSpVSySx2TzI24hdOl2gVvb13Mj0t4SlAeOfpuOK\nzDrOF86akxXLs7m/RMTnmTJwwczMx1WRKngQyp9lWUwBef1th71O2TnSdW9e\nwD1L\r\n=/scG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"7b482d20797ec24f634a88cdbe4254cd06e6e9fb","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.0/node@v14.4.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.4.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.10.0_1592493942028_0.021482512715528035","host":"s3://npm-registry-packages"}},"1.10.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.10.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.10.1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"0a8758a730b9562179bb4486066da107c9a52e8c","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.10.1.tgz","fileCount":9,"integrity":"sha512-Vucswgwqxnym3mUN0WXjgx0gnT5RVZe0B6sBHlPVrTj+W6q1fdopkg/nxX2CqYuGO0vopa20Jb7FJIOMbyDTWw==","signatures":[{"sig":"MEYCIQChJiSgjOiDxDKdfkBcEkeFWrTjPGaBnpsap9IWRRkmOgIhAOciH9hxVAfMEdQCAsG6/9tj6T+un2aD4YTC9h+BrRJj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCLlOCRA9TVsSAnZWagAAyEAQAI73MYHwnFT3n2R0Ff1H\no/TrA03ADoZZhbM2ZVpWhHPDJYtHr894cjApGrps4oCjh1eYjFWc6XQi6917\nUzm9f25f0DukKA2HyixMGq4CoqWe3iyxQFF1tc2kMI8d6I728K0IKTOW8NuO\nLvfWKuMM+aqDyHJhCPUf9G9ke4KHLyoznSeDsLqDE/Igis4c4CLKs9lY073N\ncWhewihQUPrxPzgldP7sVHR2NA/8dlTE8bsP3azLlkexsuNR6I89bPE0CrPj\ne5P3LGd1TWQRfzM8e5xGtwtWhLiI2eCawp90Lh5hc3sTHi/y7xdhtVxWNmkA\nsv6na0eZrx7iRrM88/AdHcolGKSEQelPZHpOn1an0sGQlRaVMPBOHXhQgYnd\n0QI/fg+ITfx3awikZr42VIYQ41qfY8is7/IWAvVV47eoCoyXX7B5ZtYdbS2h\nyPOYvIaPisdusVXI9De7MUrcUcpl2JBsKcv+cWNmd7Tt5Cda4VwDS5N1UNM6\nPYXXViWM+t5qdZc7bVdAaFLQ/goE8bTxkCdi4wwuvbTBSqB4klGXlmu7+iJN\nqqSLJ3EQFbilA2Pi3IM0HPovdHth3cEMVvGwMJv9sv9Ogw99Iqi5RkBWvZ02\nKF+O7x/7qqfK+8T86N6z9kCcEo2wag7RamBnajA+84EyjiI5mFqeA4ln+Oqy\neP6y\r\n=WfN6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"d1056afe8e3f44784c081b4ad1295f293199a3e4","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.0/node@v14.5.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.5.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.10.1_1594407245555_0.934402437411566","host":"s3://npm-registry-packages"}},"1.10.2":{"name":"@cnbritain/merlin-www-js-utils","version":"1.10.2","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.10.2","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"a7204742f1e59f12e798ba9f17b9fdf1f1cb1f25","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.10.2.tgz","fileCount":9,"integrity":"sha512-jkUxkbwVd9G5LF85rpv+b3e72uHMHHQr+RFBwyxRXArh8a97KmixnGiRglG4Om6Z9HVYbSskJRgsCxkjJAyvOA==","signatures":[{"sig":"MEQCIGR00BwOC5ktzNV0Y9WizUfAf3Jadmq8tOAKqhUVNo1QAiAmyY1TeQaRbOsspWTgUAZBkBp9vNErm4+zBNk0+7cuzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKVBTCRA9TVsSAnZWagAAnJAP/jjPt4iU5tuuFBtyWzSz\nS/G3gN1y0slPPFAgl1UTUwVtFfy91dU3pMSREUh/X0lq2khRHZLF6VV+y72r\nN2Bgo3KD/qLX1WUQrYRKlh6qH+dispyM1rHkKXnA9pDXqSG7+261UT391e46\nNVTV1M93OZ0/Me5yxEQ9h/334k9USmq0/Tdk3LnAQkIcCyxy3j09NgSucbS/\nF22gl3iw/B5fRvKMKsxC/cgujTU9nW7DZlRTCqhI37AntSWvtxlAqFfa69HA\npOMpUWBSgqk5bYDD61I00kKd4IsYJey3sp/NE/3wjpFTP0ijpAh364HBzhdz\nPEh1sYyRcQr+QkWlX0XErLr+Vx7+eX3pWWET7il+xUn+s4laCd+7cWD9RdH4\np6lKHJzzPhsAHfiH/1evAsjMFQ1tpCDOUcbxA9q2pSkPSyKERVfF4YNYZsqJ\nQRmwTASwHoCK5pRrveuPORccJpgJSOnkqqeT36y2eDCUBbrKczgg5046LZxl\nyzBrC87IvYBKqumkN83NCXfcFdiryJYMRvK68ezfkMbAJTNusWMCFlZLwuiA\nXDu/O3KuJRENho2yI99Z4cZC256cE+vD9UWcjOyo7B8AhOP+kcRJ4/vwgy52\nansPFzuRWLMqTWzSpdNWb7B2Hy7xw/DzwMk0QaUidCSLxk852JPL3uNG1PwR\na4r3\r\n=ZecQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"587857ebd179b03d3dbfe6fe362fe9a847fcb656","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.7.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.10.2_1596543058787_0.10504327377226663","host":"s3://npm-registry-packages"}},"1.10.3-alpha.0":{"name":"@cnbritain/merlin-www-js-utils","version":"1.10.3-alpha.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.10.3-alpha.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"59c9c960f39c61831c5644de54124529fc2b5284","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.10.3-alpha.0.tgz","fileCount":9,"integrity":"sha512-qYBJQGH4n3OuhY9U6Sqh1T7VjzQhDCo2sNUVh1O1MFpKRs3bnXj6MkEQimcWYo0nhyLxBOY7Mq4s8axyQdOTzg==","signatures":[{"sig":"MEYCIQD4vmfBouyiRsSlnVBZCNkQhWYM3kjGulbLK8IE9MxtXQIhAN7WmVeb0RbS8qOJqNSXIQ6Yh2Wni4jDE71iiXoJvxTo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKu08CRA9TVsSAnZWagAAurYP/0+woP4FHglMb8BrYmDh\nMu3OVYufRKT7m/iF/2hHFU96rbwzJT540oLVnJA5Z+6B+GVVhqOukaEtgS0t\nO+yMxs/Lpf/cTs/204QW/zcusep3bJBCztnuENFzGdKQ6Oq88npDfja3LH5S\n+tzwDPZ292RzhbFc2oMbAUNsu2NH+BszGLMoNVK49BAcQ+tSaCRg6Q+nQ3zb\n6WQIrmWFLkrGfa+IsB5aO22IdLGuIb/1/25icIfBCgbIvQ5y3W/gD0FlIrNY\nYveGgrcTK2MhMaUU38PXZvl+Zbiqdcv2+lcdaF/DxSE912pupQvHsDDGjZ/o\nWCh4G0455Z8HZxXB2gZRB5XrwnD159jEERCrkjil9+8i7yqf826i/WsWe11T\nrPCHmtHrtFrpB8PQcx5Op9g04f9lvqbMp087CqPvFq8E9WWNxUkP0rC9DU0r\nNHyDyn+ynAn6o0vw4SCDcyz7X45PmTi0Z9bZtnXndPr6xWBcYyhVlNuu0Z20\nYtcOsqyjwc6di1bFPrw7FYYg7m9/ORPI021aqVN0iL5TjyvVWTeDnevsS75H\n5jwEnKLJhC1t6kzuuG3ujayYRJedOauAWZ9r+FvT/ojb/AVxewX2LUEc5PmB\nwIZpYe0sSbcE9KwzGgysxgA/iqIgo92E+9IaaVM3mrWAVyITDWnb9gSdMXEe\nYRnc\r\n=WoRF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"bc99a85510b5e7a5236e8bd42a1757c608c64e3e","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v14.7.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.7.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.10.3-alpha.0_1596648763603_0.6219593280428459","host":"s3://npm-registry-packages"}},"1.11.1":{"name":"@cnbritain/merlin-www-js-utils","version":"1.11.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@1.11.1","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"2435f051823210f58cd147766a921efd34f30bcc","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-1.11.1.tgz","fileCount":9,"integrity":"sha512-6UeWWkUZQkFFiQj2xviWioX0xoq9uuPybGOOBN6yL8q+7ZrSVMFxX84RYhEWvhlJg2xt4MeUMiJbdb/2PT0/Fw==","signatures":[{"sig":"MEUCIHLFk8LBRV0N9N4OhhfRnEstCPCN8kCK99yGeZ9ZjnSjAiEA+v0pB6OO4316qw6Nr32Qdxjlsm1YeM70CUrg5RxQLrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRN/2CRA9TVsSAnZWagAAem4QAJRmQKhRQ3KSpeR/a04e\nyy2MItqIrxxJaM6cKPA0l+33o2IQTClPiF6bWd+uMK9n9Z0A+OAaKHf/CHv2\ntD6nLFDejsd6JUFhcOlAQwp3bu5MOF8briwJ9GsS2h32HmqNqfTnrDrW8pmD\nYFTEeTZ7Vbu1MvLQS0C27sayUj4m5C2J7Z3If5b8+ofgoD3GvFqMhGkjgEor\nl72AaKU7ckqmOPn3WU8jRxJ2YjsWQfu+d4j1hnHCRGVDodwaK+wxRITEvO0b\nR7SNEOijO+M94KSA8CSBtaRo60O8IuQG7+kUlKdC4Dkp45YgETNygSSVSxK8\nb4it5wEdsL1ZI2+Co70UpZoZGLyjiI7isNCS7vdjhkddS4ylBsXkz8rbDJCB\nEfNJyoF4bXJgjuHE/gIAi2C+qD3fVZphPTnKRQFZ8AzADBusjeXQHbhwUdyD\nG0CDeoYQtKkRZTfxcfQIsmhrSRWLw1MMzQOZGF13MkHnC8hWxVsi0i396Cqn\nVxIFUQKG9vanGDItbwSquLQdv4/ebGIUpKqitL/Q2b14ILcUW6f2heGyBRYX\nd/ANAZREirjDM8oAOZ7pGpbC86LqLpUpAxvk1cfnDQIu/gRCN71IPetGTHU8\nlf3vrDxSaa4TLz3wFsS112AxdnP/Rx4LisPo4vmAssa0cnvgUiaBJpd/z2WN\nx1Ic\r\n=f6qE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"d0b55c88330a9029cbac742ff34057e893256980","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.8.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^4.14.0","jsdoc-to-markdown":"^3.0.0","eslint-plugin-compat":"^2.2.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_1.11.1_1598349302413_0.7154602772145866","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@cnbritain/merlin-www-js-utils","version":"2.0.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@2.0.0","maintainers":[{"name":"cdmgcm","email":"cdmgcm@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"}],"dist":{"shasum":"2eb0fd1429be62289a79b1a0b438809b23311a8d","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-2.0.0.tgz","fileCount":9,"integrity":"sha512-goIFAvaGIi8xv7uMxzzj9hPiqZNbBk6oNxwrkUVpKtBRf09ojKynPXJKeikqE5B2IFTB+i9eR1HHM5ylSXMGSg==","signatures":[{"sig":"MEQCIA9eLS/eH3yU+gXqD/oQjoCIT952cqWCtpxehVBPddxWAiAgz/RBGA3exNkvrN49xu2kwmozwF10qS2omACVPzZ5Pw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRQ1pCRA9TVsSAnZWagAAln8P/RxFBo67JkO99popDJZ9\nHj3rraiSZHTXA0hl3lqU4OL2YSrge7hp9j7RCu18D+wzBjCPq/0Wq4QP/NTb\n52++FakBrO0gmSqDz1BrqPsxk458uX/8YKpU1LZXgEJVHoICLH0Tqk9LFg/I\nbhWV0hohcLkvSSdhyFG7lUK5RBYzy6BhSQq7xweonSRupGg1wQmdwEZiQjpI\nbs67i9fkeo6bA10I+ZvsFCO0U1lhkoWh2Od2zsq5fDzVxFfnOL+ecMCzZ90W\ncMwMhl1NG7GBgnkMqOIrebSFntwI4kk1NBxxiRD6nXGLAU6Uwb81Ju8OXspA\nT5fONWHwckEBNvSLFlCx3vo22qpY7KMaY9SH385aBSEIzGruoSbPM0hkM6ZN\nz0S/26sKQxh//j1dhngl/r/EI+A/hgEPjnY0ffc2qQ6hA2gEPMHkHfpa1qko\n/ua5xVI1hnyNK1l1Wy8hWgd/6Pt9VWWFHntrrIEoZDUnFRVMKZcLs9Ott5Sk\n4N1yAOa97RHrxJeb4O9WpTj6YeJpAe3jCJpiZi6Fx1/yA9hFuNsJHJuWgKzs\nC4pHj8KOvKlSNQcfkw+wQ1VOXovWvgSIZTm6X0STKCku5XjdxBguSWccIQnD\nhtez+4j38l99hHa4srZjDxpV+iMM+TJ6irzvKyJrrFW8OflTTC7LN+BadoNN\np+Gx\r\n=fd3w\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"534efff959e97fd4b55c86c39528088f2403f16b","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v14.8.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"14.8.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.7.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-compat":"^3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_2.0.0_1598360936716_0.6570347716126959","host":"s3://npm-registry-packages"}},"3.0.0-alpha.1":{"name":"@cnbritain/merlin-www-js-utils","version":"3.0.0-alpha.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@3.0.0-alpha.1","maintainers":[{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"cdmgcm","email":"carolina.mendes@condenast.com"}],"dist":{"shasum":"28ceb3c306928898488e90accad64a6e0e286e2b","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-3.0.0-alpha.1.tgz","fileCount":9,"integrity":"sha512-AHHhclbae6ROTVfTqB3hcuwGGdzvKp25+9Pe6Xt+Sl15YIva1lf9cIYCiMJR04B++LE+JaofxDO9z2Qebp8Iew==","signatures":[{"sig":"MEUCIQDDAUCO7lWXA+9RgeMs1OMhxSTTDpwej+A2U1wLhmjOLgIgAV4TBLzcAJZkQNt6Zfw+cKjauAZEt6YTxULYbGiQU04=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/GWBCRA9TVsSAnZWagAA5yUQAJvkEUjjpAJ3pPZtU+Tu\nYvOgPQ34wuDPBT5jfEYuGrc6yzNMLzXmfyJVQy+D1cP7RaEjT3lFhextTRl8\nS8eDOehcicHvPL3bFv0C3FDXBIKka6fqHu6mm30yUFaPij3k2h9WMTvrHom8\n7XojPKz0YuOvVEV9DeJCPs0Yx3yu0R5V4J7dqTcoZuF1vC2RZRZAhljDML/D\ntuijBEXZHFC4coWchLCs3HaHdmCadlgfXjNes7Qgy+6Gm8gXZdkO9FPa9K/v\noo+MU7SrfBFW/FlLKqqyAD2dhNtNp6C8xtMrm1NE+zAwjFXUcoIC5xmeElQv\n4zztWwdxtvriBwfMkR/U57DqBvhVKnRmTYKpM2z95fpIHByxzp/YbZl+8SHe\nQo1/VtR3/YJvPzQvaDMDlDb7DswKjL0usquo1OQ2/Y0+lvvhgQO+Fj3XQP4D\nl3lb18ywqIVLKhQcjDFKdktIvyAq0B6LeRihBdpHZJ0s2epElU+QIlj2qbGs\n6kmYN8/oHJ6V7OsCOtJVoCa1aphNgYNzK82ZDKlMxlBWaVaA1AlfWybEQLuz\nuMdIDIKra+kYWc3ZMK0V9D13NALVgseeLhO4KKQfnUKI5+RmBGT1Hu8buw7+\n0oGBKbZ4tiDvPB8rH6PSfeR4iyfgEON1MhHMoyBkDcRAFW7CFBsxuQzS16sn\n+xD5\r\n=he0+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","gitHead":"407d7e1a80e2319746d4b4458392fd70cacca452","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v15.5.1+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"15.5.1","_hasShrinkwrap":false,"readmeFilename":"readme.md","devDependencies":{"eslint":"^7.7.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-compat":"^3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_3.0.0-alpha.1_1610376576961_0.31018514909635964","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@cnbritain/merlin-www-js-utils","version":"3.0.0","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@3.0.0","maintainers":[{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"cdmgcm","email":"carolina.mendes@condenast.com"}],"dist":{"shasum":"d0a179749028967ff201d6de4edd595051fe1fcc","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-3.0.0.tgz","fileCount":9,"integrity":"sha512-BphSm6L/yUAa2ac3d3DkiJ0ORxhcVHSaLZnChaTDROlr9WOQazjKloR06jXx7A/ZVa9c3HcEoPPfokqjTuYAQg==","signatures":[{"sig":"MEYCIQCGODl//Gjb1wDKFTH/6doGaxbFyweDlbCJ/PoOLdFwGAIhAPjtUAZzfWyWeFFRzEYV3yrVg1dhOVuPB93hdTzlkSxN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIV8rCRA9TVsSAnZWagAAc58P/jh0WAtgfT5b/ItU6akt\nWgrvp71+Qzne1o3j8lQ4OmXNcO2i+AbpusbntdBfQkwFsV+JV1nIlFRCdlCX\nRxNyJfWPED0q3tVq4wq8qzr+Jlay9FqK83i1GACXxfmT/d2Nwn6dmnt356lX\nXb0SfMddDw/rh3FC7hYcAcEvfQKxadDj1a7VGIou2jB5aSNz55agvONP5jMu\nqeT5Hrm1rbvEBtgT1DcUhUyWg9eDWhOtQmJ4pQzzf+RrUDOAw4uFWA2UDQPv\nNGXt1tJ3oX191KWvb5U2fU2kwh6wD8vONx8ulU8ZesGvqE82curqVbklv1zm\nyfgLR7bwDxT+LP6beDrGgm458UDfSkFzmqWtBh9cBjGsKcYNUtd5TaQO+34G\niFbIHoPeO085WKR63+jGux/QedK3XFxXM6ZqqSg+nCmCaRqDOLf0IO0L6lYC\nR+xkKdOBX51wpcEFulLYtaXvackEcajgeTKPKHAe9Rif/V2o3G8+MhPxgZkS\n1jRE2PevBKtk58b8GM9SK7k0QJpgdQGcWsMZNTDfLo0Dwsr1E3dsCVU+Yl+e\nOYN43pVJJwZM0wUJQ71ziyItfLIdU3HUKR0079PXDt6X8JfEKcE3sxki2aTJ\ngW+43vZbM1vFzbTMo7E4l3te/9ErMdgubpjrMgYGrYf5GM458ok3HHd2KzjK\nbIAv\r\n=Y19T\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"d2929dcaba9c4890426f15e106134509cddd19f9","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v15.8.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"15.8.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.7.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-compat":"^3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_3.0.0_1612799786767_0.6671876874155398","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@cnbritain/merlin-www-js-utils","version":"3.0.1","author":"","license":"ISC","_id":"@cnbritain/merlin-www-js-utils@3.0.1","maintainers":[{"name":"danelliottpalmer","email":"danelliottpalmer@gmail.com"},{"name":"rtt","email":"npmjs@rsty.org"},{"name":"samtiffin","email":"sam@samtiffin.com"},{"name":"stefanpiazza","email":"stefanpiazza@gmail.com"},{"name":"cnduk","email":"digital-production-lead@condenast.co.uk"},{"name":"cdmgcm","email":"carolina.mendes@condenast.com"}],"dist":{"shasum":"0019de0ca8dfde9424199f9b70bd79ca76bf34f9","tarball":"https://registry.npmjs.org/@cnbritain/merlin-www-js-utils/-/merlin-www-js-utils-3.0.1.tgz","fileCount":9,"integrity":"sha512-9Vljo0MyQneEo/Rm0+dE8vjmLrnDOe+rfruWfTVOOB5lvWLLvHue8aOQhXrB1wG6KEUowl14YDUSOT+UD0mW6Q==","signatures":[{"sig":"MEUCIHIq9pe3dd1WG3ROq8ytLYxWmj7RJ3hAd+5IQ+u6baWJAiEArsxCIOIE/KQklq7g9G4ip8JXC1u14srp1+SD14un7rk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNmg4CRA9TVsSAnZWagAAlOUP/AvzQQgFCbYJsBcIC3Rw\nQB1A2zXcrsn94LZny6M1TxCjZZLjS2KAluaRMpqbjw2/vaCUtgQIdp/iOcut\nDYs6cSp3tA6xs9At3tO0Kpp3r78A783pAH3Rf6y3g9ww5K9C0e8Inb0oy4IE\n4J8FwVprA8spVNWmYlknWRuylBRXSfdiJ+tiT/dh9geNu7AoRbVV/RvxzTTH\nawjUBoWTdsK/v5Nch7Vt38fy0Ksgkvi4yA4APa0NiOXpYnJyRw22dqrrLWk6\nAf5IgkFpJn0vgYBpKD0qS1kNDST84Iukh6pB7WnTggfv72wYfAq4O2DiFeCS\nlUO8wTX/CwlNhG4kW0IEIIDAueDqmkIfAmBzfir6XEC5OayNGXET7PrMSgsj\nL6CLwpykqi80jdITlTy3SrvaedR3UKGK/aIopRgNNicpdP98cUBGrHC2r3J+\nREnNDMqrZjiq5SlN3Os3N0BE46vYuCZ7FuxFgCPdBht4Yzntbaqah9UfB20e\n8ga9YeDZJppYVs7KTCKPe1Y2EVM3HfM0DNh2YrncNZtJMTuHhHBL/1kbPWxL\njT11YLcSrl9OyL8tvRzfgXOIrPdcwNAIa1GnJqYNFqSjOKUh7OWJqicxeZnC\nq+Dh8eKseX8MmbeXb3Azty+32yWKGgDPOTeA0OPim08P/Vk9vhdMSyNXR1xV\nOCt1\r\n=RWIE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"js/index.js","gitHead":"810f385fa1ca0f2472da4211776add986980a778","scripts":{"docs":"jsdoc2md js/*.js > readme.md","lint":"eslint -c ../../.eslintrc.json ./js/**/*","prepublish":"npm run lint"},"_npmUser":{"name":"samtiffin","email":"sam@samtiffin.com"},"_npmVersion":"lerna/3.22.1/node@v15.9.0+x64 (darwin)","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","directories":{},"_nodeVersion":"15.9.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^7.7.0","jsdoc-to-markdown":"^6.0.1","eslint-plugin-compat":"^3.8.0"},"_npmOperationalInternal":{"tmp":"tmp/merlin-www-js-utils_3.0.1_1614178360156_0.12009423066966485","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-02-23T13:02:36.726Z","modified":"2026-02-03T15:04:35.607Z","1.0.1":"2017-02-23T13:02:36.726Z","1.0.2":"2017-04-26T15:14:55.917Z","1.1.0":"2017-05-30T15:18:32.092Z","1.2.0":"2017-06-23T11:25:56.774Z","1.2.1":"2017-06-23T11:33:44.320Z","1.2.2":"2017-07-21T12:06:20.204Z","1.3.0-alpha.8c4d0183":"2017-08-02T09:22:52.779Z","1.3.0-alpha.0bab8950":"2017-08-02T09:35:05.199Z","1.3.0-alpha.325733d4":"2017-08-07T14:38:56.537Z","1.3.0-alpha.6db8a6f4":"2017-09-13T13:59:35.201Z","1.3.0-alpha.4b03bd5e":"2017-09-19T14:21:53.216Z","1.3.0-alpha.46b2ed5b":"2017-09-20T14:37:24.296Z","1.3.0":"2017-10-03T16:14:54.339Z","1.3.1":"2017-10-30T15:31:04.233Z","1.4.0-alpha.a38e504c":"2017-11-16T16:53:37.542Z","1.4.0-alpha.f190ed1a":"2017-11-17T10:49:29.112Z","1.4.0-alpha.33fe0741":"2017-11-17T17:54:35.558Z","1.3.2":"2017-11-21T11:01:35.936Z","1.3.3":"2017-12-06T11:35:39.682Z","1.3.4":"2017-12-06T15:03:21.350Z","1.3.5":"2017-12-07T10:32:41.426Z","1.3.7":"2018-01-04T11:36:18.581Z","1.3.8":"2018-01-04T11:51:00.066Z","1.4.0-alpha.cbc854c6":"2018-01-05T10:59:07.626Z","1.4.0-alpha.d74c9028":"2018-01-05T11:04:17.823Z","1.3.11":"2018-01-09T12:11:01.588Z","1.4.0-alpha.0d7c269e":"2018-01-22T15:15:01.031Z","1.4.0-alpha.fbddcc93":"2018-02-01T10:11:29.353Z","1.4.0-alpha.5464422f":"2018-02-01T10:37:42.864Z","1.4.0-alpha.d353df7f":"2018-02-14T17:43:16.132Z","1.4.0":"2018-03-01T10:57:18.438Z","1.4.1":"2018-03-09T11:01:00.597Z","1.4.2":"2018-03-13T12:52:38.741Z","1.5.0-alpha.b735974c":"2018-03-19T11:42:42.163Z","1.5.0-alpha.c6bfabf0":"2018-03-19T11:53:58.266Z","1.5.0-alpha.de72f877":"2018-03-19T12:31:19.245Z","1.5.0":"2018-03-19T13:09:52.728Z","1.5.2":"2018-03-20T15:10:06.759Z","1.6.0-alpha.70f4e307":"2018-03-22T14:09:14.291Z","1.6.0":"2018-03-23T16:01:47.044Z","1.6.0-alpha.e9030b87":"2018-03-27T15:04:08.028Z","1.6.0-alpha.de38a0a8":"2018-03-27T16:06:43.204Z","1.5.2-alpha.de38a0a8":"2018-03-27T16:23:53.966Z","1.6.0-beta.de38a0a8":"2018-03-27T16:29:31.660Z","1.6.0-dev.de38a0a8":"2018-03-27T17:10:07.386Z","1.6.0-alpha.fcecef2e":"2018-03-28T09:12:55.022Z","1.6.0-alpha.8458de26":"2018-03-28T12:59:23.064Z","1.6.0-alpha.a0fd1321":"2018-03-28T14:43:03.471Z","1.6.0-alpha.18520bf8":"2018-03-28T15:06:32.476Z","1.6.0-dev.18520bf8":"2018-03-28T15:34:56.571Z","1.7.0-alpha.b29f7426":"2018-03-29T11:54:17.983Z","1.7.0-alpha.2ff0230b":"2018-04-03T10:53:10.010Z","1.7.0-alpha.3719e99a":"2018-04-03T11:12:40.274Z","1.7.0-alpha.0bd04e31":"2018-04-03T11:29:56.043Z","1.7.0-alpha.a8f71bef":"2018-04-03T12:34:07.100Z","1.7.0-alpha.b253a772":"2018-04-03T13:49:44.456Z","1.7.0-alpha.9fc11b48":"2018-04-03T14:02:25.046Z","1.7.0-alpha.c7cede5a":"2018-04-03T14:32:45.637Z","1.6.1":"2018-04-06T14:05:21.593Z","1.7.0-alpha.90c2a973":"2018-05-25T14:56:03.099Z","1.7.0-alpha.60c27ca3":"2018-05-25T15:40:54.353Z","1.7.0-alpha.2b31d299":"2018-05-25T16:03:58.130Z","1.7.0-alpha.f9740aff":"2018-05-25T17:00:11.932Z","1.7.0-alpha.0d92a51e":"2018-05-25T17:32:57.582Z","1.7.0-alpha.c8034bf1":"2018-05-29T10:29:26.967Z","1.7.0-alpha.06e21880":"2018-05-29T11:41:57.410Z","1.7.0-alpha.bf6efaf6":"2018-05-29T15:35:47.243Z","1.7.0-alpha.65198f75":"2018-05-29T15:53:59.425Z","1.7.0-alpha.9a981ca3":"2018-05-29T16:12:09.736Z","1.7.0-alpha.f8ed323a":"2018-05-29T17:41:59.510Z","1.7.0-alpha.b3aee6be":"2018-05-30T09:04:11.094Z","1.7.0-alpha.fc31c912":"2018-05-30T11:58:37.387Z","1.7.0-alpha.534a3cb2":"2018-05-30T14:04:40.384Z","1.7.0-alpha.f80cf84d":"2018-05-30T16:47:05.171Z","1.6.2":"2018-06-06T09:40:10.352Z","1.7.0-alpha.fdf77e12":"2018-06-08T11:00:20.438Z","1.7.0-alpha.c492b8c1":"2018-06-11T11:45:01.206Z","1.7.0-alpha.5b11df8d":"2018-06-11T12:08:35.634Z","1.7.0-alpha.78d31f37":"2018-06-18T10:07:09.133Z","1.7.0-alpha.3fb22e57":"2018-06-18T10:31:34.276Z","1.7.0-alpha.3dd425ba":"2018-06-19T17:31:46.317Z","1.7.0-alpha.a4cf9b28":"2018-06-25T13:38:38.595Z","1.7.0-alpha.dbd1f93e":"2018-06-27T13:45:59.026Z","1.7.0-alpha.26edd749":"2018-06-27T13:54:08.887Z","1.7.0-alpha.bdb7c09a":"2018-06-27T15:20:36.863Z","1.7.0-alpha.4f94f667":"2018-07-06T14:37:34.462Z","1.7.0-alpha.4bc5eb73":"2018-07-09T14:14:24.267Z","1.7.0-alpha.47a1bbcc":"2018-07-09T14:20:04.857Z","1.7.0-alpha.2527b1de":"2018-07-09T14:35:12.621Z","1.7.0-alpha.6123c2e6":"2018-07-09T14:41:19.396Z","1.7.0-alpha.c9b46a18":"2018-07-24T10:43:55.908Z","1.7.0-alpha.46b24380":"2018-07-24T11:22:55.263Z","1.7.0-alpha.1b206c1c":"2018-07-24T14:05:45.840Z","1.7.0-alpha.7dffbece":"2018-07-31T09:28:38.185Z","1.7.0-alpha.b99fe740":"2018-07-31T14:57:13.312Z","1.7.0-alpha.f79b8d3e":"2018-08-01T14:46:56.306Z","1.7.0-alpha.0c0b945f":"2018-08-01T14:59:21.113Z","1.7.0-alpha.b68aec03":"2018-08-02T08:29:58.095Z","1.7.0-alpha.328d5350":"2018-08-14T10:31:23.447Z","1.7.0-alpha.5f6f80ad":"2018-08-14T10:39:34.701Z","1.7.0-alpha.78e4c0a5":"2018-08-15T15:14:01.755Z","1.6.3":"2018-08-17T10:35:48.845Z","1.6.4":"2018-08-21T08:47:25.447Z","1.7.0-alpha.9ed2d3ce":"2018-08-21T11:22:38.237Z","1.7.0-alpha.54a06df1":"2018-08-23T07:48:52.658Z","1.7.0-alpha.8985c2a2":"2018-08-23T09:39:44.167Z","1.7.0-alpha.204e5701":"2018-08-23T10:04:35.282Z","1.7.0-alpha.2d09f0d9":"2018-08-23T11:42:02.534Z","1.7.0-alpha.f2a6dd70":"2018-09-06T09:04:13.694Z","1.7.0-alpha.8b169838":"2018-09-18T11:25:53.985Z","1.7.0-alpha.440cbe7a":"2018-09-18T11:36:26.385Z","1.7.0-alpha.eb6fe119":"2018-09-19T10:30:22.116Z","1.7.0-alpha.80c2bd62":"2018-09-28T09:16:43.021Z","1.7.0-alpha.e2c4c589":"2018-10-17T09:40:53.791Z","1.7.0-alpha.28216460":"2018-10-17T09:47:17.249Z","1.7.0-alpha.3b040fb3":"2018-10-17T11:05:25.207Z","1.7.0-alpha.19950df3":"2018-10-18T09:26:12.185Z","1.7.0-alpha.6323c901":"2018-10-18T14:44:00.574Z","1.7.0-alpha.41634e2d":"2018-10-22T09:58:01.890Z","1.7.0-alpha.4253474d":"2018-10-22T14:16:01.694Z","1.7.0-alpha.e0b64764":"2018-10-26T09:36:50.691Z","1.7.0-alpha.c1395f25":"2018-10-26T11:11:06.386Z","1.7.0":"2018-11-05T15:33:08.242Z","1.8.0-alpha.d0b3d1ad":"2018-11-23T12:40:26.851Z","1.8.0-alpha.a2eeae6e":"2018-11-23T12:49:58.592Z","1.8.0-alpha.4be3cb6b":"2018-12-13T11:20:17.727Z","1.8.0-alpha.8a7ee4ea":"2019-01-03T10:41:57.543Z","1.8.0-alpha.265c7297":"2019-01-03T12:02:39.659Z","1.8.0-alpha.1208b18a":"2019-01-03T12:05:31.400Z","1.8.0-alpha.43e5a9a6":"2019-01-03T13:03:29.257Z","1.8.0-alpha.4336d68f":"2019-01-03T13:12:26.599Z","1.8.0-alpha.7ddb2824":"2019-01-03T15:20:01.582Z","1.8.0-alpha.9bab6032":"2019-01-03T15:34:47.049Z","1.7.1-beta.49":"2019-01-09T10:31:23.161Z","1.8.0-alpha.8ac3267f":"2019-01-09T12:25:51.384Z","1.7.1-alpha.47":"2019-01-14T12:23:55.142Z","1.8.0-alpha.025488c5":"2019-02-08T11:05:02.998Z","1.7.1-alpha.118":"2019-12-20T15:46:53.854Z","1.7.1-alpha.0":"2019-12-20T16:19:39.133Z","1.9.0":"2019-12-27T10:24:08.431Z","1.9.6":"2020-05-05T16:49:24.749Z","1.9.7":"2020-05-05T16:57:04.643Z","1.9.8":"2020-05-05T17:01:56.796Z","1.9.10":"2020-06-15T11:35:03.698Z","1.10.0":"2020-06-18T15:25:42.172Z","1.10.1":"2020-07-10T18:54:05.777Z","1.10.2":"2020-08-04T12:10:58.937Z","1.10.3-alpha.0":"2020-08-05T17:32:43.822Z","1.11.1":"2020-08-25T09:55:02.582Z","2.0.0":"2020-08-25T13:08:57.092Z","3.0.0-alpha.1":"2021-01-11T14:49:37.120Z","3.0.0":"2021-02-08T15:56:27.057Z","3.0.1":"2021-02-24T14:52:40.358Z"},"license":"ISC","description":"<dl> <dt><a href=\"#module_detect\">detect</a></dt> <dd></dd> <dt><a href=\"#module_functions\">functions</a></dt> <dd></dd> </dl>","maintainers":[{"email":"npmjs@rsty.org","name":"rtt"},{"email":"sam@samtiffin.com","name":"samtiffin"},{"email":"digital-production-lead@condenast.co.uk","name":"cnduk"},{"email":"paul.eddleston@condenastint.com","name":"eddleston"}],"readme":"## Modules\n\n<dl>\n<dt><a href=\"#module_detect\">detect</a></dt>\n<dd></dd>\n<dt><a href=\"#module_functions\">functions</a></dt>\n<dd></dd>\n</dl>\n\n<a name=\"module_detect\"></a>\n\n## detect\n\n* [detect](#module_detect)\n    * [.getUserAgent](#module_detect.getUserAgent) ⇒ <code>Object</code>\n    * [.hasHistory](#module_detect.hasHistory) : <code>Boolean</code>\n    * [.hasTouch](#module_detect.hasTouch) : <code>Boolean</code>\n    * [.isAndroid](#module_detect.isAndroid) : <code>Boolean</code>\n    * [.isIOS](#module_detect.isIOS) : <code>Boolean</code>\n    * [.isLinux](#module_detect.isLinux) : <code>Boolean</code>\n    * [.isMac](#module_detect.isMac) : <code>Boolean</code>\n    * [.isWindows](#module_detect.isWindows) : <code>Boolean</code>\n    * [.supportBoxModel](#module_detect.supportBoxModel) ⇒ <code>Boolean</code>\n    * [.supportsHTML5Video](#module_detect.supportsHTML5Video) ⇒ <code>Boolean</code>\n\n<a name=\"module_detect.getUserAgent\"></a>\n\n### detect.getUserAgent ⇒ <code>Object</code>\nCreates an object with user agent information\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n**Url**: http://stackoverflow.com/questions/5916900/how-can-you-detect-the-version-of-a-browser  \n<a name=\"module_detect.hasHistory\"></a>\n\n### detect.hasHistory : <code>Boolean</code>\nwindow.history support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.hasTouch\"></a>\n\n### detect.hasTouch : <code>Boolean</code>\nTouch support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isAndroid\"></a>\n\n### detect.isAndroid : <code>Boolean</code>\nAndroid useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isIOS\"></a>\n\n### detect.isIOS : <code>Boolean</code>\niOS useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isLinux\"></a>\n\n### detect.isLinux : <code>Boolean</code>\nLinux useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isMac\"></a>\n\n### detect.isMac : <code>Boolean</code>\nMacintoch useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.isWindows\"></a>\n\n### detect.isWindows : <code>Boolean</code>\nWindows useragent sniff\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportBoxModel\"></a>\n\n### detect.supportBoxModel ⇒ <code>Boolean</code>\nBox model support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_detect.supportsHTML5Video\"></a>\n\n### detect.supportsHTML5Video ⇒ <code>Boolean</code>\nHTML5 video support\n\n**Kind**: static property of <code>[detect](#module_detect)</code>  \n<a name=\"module_functions\"></a>\n\n## functions\n\n* [functions](#module_functions)\n    * [.addClass(el, cls)](#module_functions.addClass)\n    * [.addEvent(el, type, fn)](#module_functions.addEvent)\n    * [.addEventOnce(el, type, fn)](#module_functions.addEventOnce)\n    * [.addHtml(node)](#module_functions.addHtml)\n    * [.ajax(options)](#module_functions.ajax) ⇒ <code>Promise</code>\n    * [.assign(target, ...source)](#module_functions.assign) ⇒ <code>Object</code>\n    * [.clamp(min, max, value1)](#module_functions.clamp) ⇒ <code>Number/Function</code>\n    * [.cloneArray(src)](#module_functions.cloneArray) ⇒ <code>Array</code>\n    * [.cloneArrayDeep(src)](#module_functions.cloneArrayDeep) ⇒ <code>Array</code>\n    * [.cloneObject(src)](#module_functions.cloneObject) ⇒ <code>Object</code>\n    * [.cloneObjectDeep(src)](#module_functions.cloneObjectDeep) ⇒ <code>Object</code>\n    * [.createEventTemplate(type, target, eventData)](#module_functions.createEventTemplate) ⇒ <code>Object</code>\n    * [.debounce(fn, wait, scope, immediate)](#module_functions.debounce) ⇒ <code>function</code>\n    * [.delegate(selector, fn, ctx)](#module_functions.delegate) ⇒ <code>function</code>\n    * [.exitFullscreen(el)](#module_functions.exitFullscreen)\n    * [.fireEvent(el, type, bubble, cancelable)](#module_functions.fireEvent) ⇒ <code>Boolean</code>\n    * [.forEachShift(collection, fn)](#module_functions.forEachShift)\n    * [.getElementOffset(el)](#module_functions.getElementOffset) ⇒ <code>Object</code>\n    * [.getEventTarget(e)](#module_functions.getEventTarget) ⇒ <code>\\*</code>\n    * [.getIframeFromWindow(window)](#module_functions.getIframeFromWindow) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getObjectValues(obj, keys)](#module_functions.getObjectValues) ⇒ <code>Array.&lt;\\*&gt;</code>\n    * [.getParent(el, selector)](#module_functions.getParent) ⇒ <code>HTMLNode/Boolean</code>\n    * [.getPrevious(el, selector)](#module_functions.getPrevious) ⇒ <code>HTMLElement/Boolean</code>\n    * [.getParentUntil(el, selector)](#module_functions.getParentUntil) ⇒ <code>Object</code>\n    * [.getPreviousElementUntil(el, selector)](#module_functions.getPreviousElementUntil) ⇒ <code>Object</code>\n    * [.getScrollLeft(el)](#module_functions.getScrollLeft) ⇒ <code>Number</code>\n    * [.getScrollTop(el)](#module_functions.getScrollTop) ⇒ <code>Number</code>\n    * [.getNamespaceKey(abbr)](#module_functions.getNamespaceKey) ⇒ <code>String</code>\n    * [.getWindowScrollLeft()](#module_functions.getWindowScrollLeft) ⇒ <code>Number</code>\n    * [.getWindowScrollTop()](#module_functions.getWindowScrollTop) ⇒ <code>Number</code>\n    * [.hasClass(el, cls)](#module_functions.hasClass) ⇒ <code>Boolean</code>\n    * [.hasOwnProperty(obj, key)](#module_functions.hasOwnProperty) ⇒ <code>Boolean</code>\n    * [.inherit(src, props)](#module_functions.inherit) ⇒ <code>Object</code>\n    * [.insertBefore(child, ref)](#module_functions.insertBefore) ⇒ <code>HTMLElement</code>\n    * [.isArray(src)](#module_functions.isArray) ⇒ <code>Boolean</code>\n    * [.isArticleAdSlot(placement)](#module_functions.isArticleAdSlot) ⇒ <code>Boolean</code>\n    * [.isDefined(value)](#module_functions.isDefined) ⇒ <code>Boolean</code>\n    * [.isEmptyString(value)](#module_functions.isEmptyString) ⇒ <code>Boolean</code>\n    * [.isElement(value)](#module_functions.isElement) ⇒ <code>Boolean</code>\n    * [.isHeaderAdSlot(placement)](#module_functions.isHeaderAdSlot) ⇒ <code>Boolean</code>\n    * [.isObject(src)](#module_functions.isObject) ⇒ <code>Boolean</code>\n    * [.isSplashAdSlot(placement)](#module_functions.isSplashAdSlot) ⇒ <code>Boolean</code>\n    * [.isWindow(win)](#module_functions.isWindow) ⇒ <code>Boolean</code>\n    * [.loadScript(url, options)](#module_functions.loadScript) ⇒ <code>Promise</code>\n    * [.loadSocialScripts()](#module_functions.loadSocialScripts) ⇒ <code>Promise</code>\n    * [.not(value)](#module_functions.not) ⇒ <code>Boolean</code>\n    * [.onPageLoad(loadFn)](#module_functions.onPageLoad)\n    * [.onPageReady(readyFn)](#module_functions.onPageReady)\n    * [.padValue(value, width, chr)](#module_functions.padValue) ⇒ <code>String</code>\n    * [.randomUUID()](#module_functions.randomUUID) ⇒ <code>String</code>\n    * [.removeClass(el, cls)](#module_functions.removeClass)\n    * [.removeElement(el)](#module_functions.removeElement)\n    * [.removeEvent(el, type, fn)](#module_functions.removeEvent)\n    * [.throttle(fn, threshhold, scope)](#module_functions.throttle) ⇒ <code>function</code>\n    * [.toBoolean(value)](#module_functions.toBoolean) ⇒ <code>Boolean</code>\n    * [.toggleClass(el, cls)](#module_functions.toggleClass)\n    * [.unescapeJinjaValue(value)](#module_functions.unescapeJinjaValue) ⇒ <code>\\*</code>\n\n<a name=\"module_functions.addClass\"></a>\n\n### functions.addClass(el, cls)\nAdds a class to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.addEvent\"></a>\n\n### functions.addEvent(el, type, fn)\nAdds an event to an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addEventOnce\"></a>\n\n### functions.addEventOnce(el, type, fn)\nAdds an event that will fire once and then remove itself\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.addHtml\"></a>\n\n### functions.addHtml(node)\nAdds html to a node\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| node | <code>HTMLElement</code> | \n\n<a name=\"module_functions.ajax\"></a>\n\n### functions.ajax(options) ⇒ <code>Promise</code>\nBasic ajax function\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| options | <code>Object</code> | \n\n<a name=\"module_functions.assign\"></a>\n\n### functions.assign(target, ...source) ⇒ <code>Object</code>\nAssigns the values of the other sources to the target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| target | <code>Object</code> | \n| ...source | <code>Object</code> | \n\n<a name=\"module_functions.clamp\"></a>\n\n### functions.clamp(min, max, value1) ⇒ <code>Number/Function</code>\nClamps a value to the min and max. Also set up to allow currying.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| min | <code>Number</code> | \n| max | <code>Number</code> | \n| value1 | <code>Number</code> | \n\n<a name=\"module_functions.cloneArray\"></a>\n\n### functions.cloneArray(src) ⇒ <code>Array</code>\nClones an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneArrayDeep\"></a>\n\n### functions.cloneArrayDeep(src) ⇒ <code>Array</code>\nClones an array while recursively cloning the items inside\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Array</code> | \n\n<a name=\"module_functions.cloneObject\"></a>\n\n### functions.cloneObject(src) ⇒ <code>Object</code>\nClones an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.cloneObjectDeep\"></a>\n\n### functions.cloneObjectDeep(src) ⇒ <code>Object</code>\nClones an object whilst recursively cloning the descendants\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n\n<a name=\"module_functions.createEventTemplate\"></a>\n\n### functions.createEventTemplate(type, target, eventData) ⇒ <code>Object</code>\nCreates an object for events\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| type | <code>String</code> | The type of event |\n| target | <code>Object</code> | The thing that emitted the event |\n| eventData | <code>Object</code> | Some data |\n\n<a name=\"module_functions.debounce\"></a>\n\n### functions.debounce(fn, wait, scope, immediate) ⇒ <code>function</code>\nDebounce function, allows one function to be ran `wait` milliseconds after.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| wait | <code>Number</code> | Number of milliseconds |\n| scope | <code>Object</code> |  |\n| immediate | <code>Boolean</code> |  |\n\n<a name=\"module_functions.delegate\"></a>\n\n### functions.delegate(selector, fn, ctx) ⇒ <code>function</code>\nCreates a function that will delegate events to a selector\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| selector | <code>String</code> | \n| fn | <code>function</code> | \n| ctx | <code>\\*</code> | \n\n<a name=\"module_functions.exitFullscreen\"></a>\n\n### functions.exitFullscreen(el)\nExits fullscreen mode for the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.fireEvent\"></a>\n\n### functions.fireEvent(el, type, bubble, cancelable) ⇒ <code>Boolean</code>\nFires an event on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>Boolean</code> - Was the event cancelled?  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| el | <code>HTMLElement</code> |  |\n| type | <code>String</code> | The type of event |\n| bubble | <code>Boolean</code> | Should the event bubble? |\n| cancelable | <code>Boolean</code> | Should the event be cancelable? |\n\n<a name=\"module_functions.forEachShift\"></a>\n\n### functions.forEachShift(collection, fn)\nLoop over a collection and shift the item from the collection\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| collection | <code>Array</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.getElementOffset\"></a>\n\n### functions.getElementOffset(el) ⇒ <code>Object</code>\nGets the elements offset. Based off of jquerys implementation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n\n<a name=\"module_functions.getEventTarget\"></a>\n\n### functions.getEventTarget(e) ⇒ <code>\\*</code>\nGets the event target\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>\\*</code> - The target of the event  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| e | <code>Object</code> | The event information |\n\n<a name=\"module_functions.getIframeFromWindow\"></a>\n\n### functions.getIframeFromWindow(window) ⇒ <code>HTMLNode/Boolean</code>\nGets the iframe element based on the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| window | <code>Window</code> | \n\n<a name=\"module_functions.getObjectValues\"></a>\n\n### functions.getObjectValues(obj, keys) ⇒ <code>Array.&lt;\\*&gt;</code>\nGets the values from an object. If keys are specified, it will only get\nthe values of those keys.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| obj | <code>Object</code> | Source object |\n| keys | <code>Array.&lt;String&gt;</code> |  |\n\n<a name=\"module_functions.getParent\"></a>\n\n### functions.getParent(el, selector) ⇒ <code>HTMLNode/Boolean</code>\nGets the parent element matching the selector. If it doesn't match, returns\nnothing\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPrevious\"></a>\n\n### functions.getPrevious(el, selector) ⇒ <code>HTMLElement/Boolean</code>\nGets the previous element matching the selector. If it doesn't match,\nreturns false\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getParentUntil\"></a>\n\n### functions.getParentUntil(el, selector) ⇒ <code>Object</code>\nGets the parent till the selector or the root.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getPreviousElementUntil\"></a>\n\n### functions.getPreviousElementUntil(el, selector) ⇒ <code>Object</code>\nGets the previous element till the selector or the root\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| selector | <code>String</code> | \n\n<a name=\"module_functions.getScrollLeft\"></a>\n\n### functions.getScrollLeft(el) ⇒ <code>Number</code>\nGets the scroll left of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getScrollTop\"></a>\n\n### functions.getScrollTop(el) ⇒ <code>Number</code>\nGets the scroll top of the element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode/Window</code> | \n\n<a name=\"module_functions.getNamespaceKey\"></a>\n\n### functions.getNamespaceKey(abbr) ⇒ <code>String</code>\nCreates a key based on the brand abbreviation\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| abbr | <code>String</code> | \n\n<a name=\"module_functions.getWindowScrollLeft\"></a>\n\n### functions.getWindowScrollLeft() ⇒ <code>Number</code>\nGets the scrollleft of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.getWindowScrollTop\"></a>\n\n### functions.getWindowScrollTop() ⇒ <code>Number</code>\nGets the scrolltop of the window\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.hasClass\"></a>\n\n### functions.hasClass(el, cls) ⇒ <code>Boolean</code>\nChecks if the element has a class\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.hasOwnProperty\"></a>\n\n### functions.hasOwnProperty(obj, key) ⇒ <code>Boolean</code>\nhasOwnProperty that prevents contamination from the object being tested\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| obj | <code>Object</code> | \n| key | <code>String</code> | \n\n<a name=\"module_functions.inherit\"></a>\n\n### functions.inherit(src, props) ⇒ <code>Object</code>\nCreates a new object based from src. Then copies over any properties.\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>Object</code> | \n| props | <code>Object</code> &#124; <code>Undefined</code> | \n\n<a name=\"module_functions.insertBefore\"></a>\n\n### functions.insertBefore(child, ref) ⇒ <code>HTMLElement</code>\nInserts the child element before the reference\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n**Returns**: <code>HTMLElement</code> - The child  \n\n| Param | Type |\n| --- | --- |\n| child | <code>HTMLElement</code> | \n| ref | <code>HTMLElement</code> | \n\n<a name=\"module_functions.isArray\"></a>\n\n### functions.isArray(src) ⇒ <code>Boolean</code>\nChecks if the src is an array\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isArticleAdSlot\"></a>\n\n### functions.isArticleAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is in an article slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isDefined\"></a>\n\n### functions.isDefined(value) ⇒ <code>Boolean</code>\nChecks if a value is defined\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isEmptyString\"></a>\n\n### functions.isEmptyString(value) ⇒ <code>Boolean</code>\nChecks if the value is an empty string\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isElement\"></a>\n\n### functions.isElement(value) ⇒ <code>Boolean</code>\nChecks if the value is an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.isHeaderAdSlot\"></a>\n\n### functions.isHeaderAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a header slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isObject\"></a>\n\n### functions.isObject(src) ⇒ <code>Boolean</code>\nChecks if the src is an object\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| src | <code>\\*</code> | \n\n<a name=\"module_functions.isSplashAdSlot\"></a>\n\n### functions.isSplashAdSlot(placement) ⇒ <code>Boolean</code>\nChecks if the placement is a splash slot\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| placement | <code>String</code> | \n\n<a name=\"module_functions.isWindow\"></a>\n\n### functions.isWindow(win) ⇒ <code>Boolean</code>\nChecks if win is a window element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| win | <code>\\*</code> | \n\n<a name=\"module_functions.loadScript\"></a>\n\n### functions.loadScript(url, options) ⇒ <code>Promise</code>\nLoads a script file into the page\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| url | <code>String</code> | \n| options | <code>Object</code> | \n\n<a name=\"module_functions.loadSocialScripts\"></a>\n\n### functions.loadSocialScripts() ⇒ <code>Promise</code>\nLoads any social scripts. Includes twitter, facebook, vine, instagram\nand imgur\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.not\"></a>\n\n### functions.not(value) ⇒ <code>Boolean</code>\nInverts the value\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.onPageLoad\"></a>\n\n### functions.onPageLoad(loadFn)\nRuns loadFn once the page has loaded\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| loadFn | <code>function</code> | \n\n<a name=\"module_functions.onPageReady\"></a>\n\n### functions.onPageReady(readyFn)\nRuns readyFn once the page is ready\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| readyFn | <code>function</code> | \n\n<a name=\"module_functions.padValue\"></a>\n\n### functions.padValue(value, width, chr) ⇒ <code>String</code>\nPads a number\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>Number</code> | \n| width | <code>Number</code> | \n| chr | <code>String</code> | \n\n<a name=\"module_functions.randomUUID\"></a>\n\n### functions.randomUUID() ⇒ <code>String</code>\nGenerates a random id\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n<a name=\"module_functions.removeClass\"></a>\n\n### functions.removeClass(el, cls)\nRemoves a class from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.removeElement\"></a>\n\n### functions.removeElement(el)\nRemoves the element from the tree\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLElement</code> | \n\n<a name=\"module_functions.removeEvent\"></a>\n\n### functions.removeEvent(el, type, fn)\nRemoves an event from an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| type | <code>String</code> | \n| fn | <code>function</code> | \n\n<a name=\"module_functions.throttle\"></a>\n\n### functions.throttle(fn, threshhold, scope) ⇒ <code>function</code>\nThrottles an event being fired by the threshold\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| fn | <code>function</code> |  |\n| threshhold | <code>Number</code> | Milliseconds to throttle by |\n| scope | <code>Object</code> |  |\n\n<a name=\"module_functions.toBoolean\"></a>\n\n### functions.toBoolean(value) ⇒ <code>Boolean</code>\nConverts a value to a boolean\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n<a name=\"module_functions.toggleClass\"></a>\n\n### functions.toggleClass(el, cls)\nToggles a class on an element\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| el | <code>HTMLNode</code> | \n| cls | <code>String</code> | \n\n<a name=\"module_functions.unescapeJinjaValue\"></a>\n\n### functions.unescapeJinjaValue(value) ⇒ <code>\\*</code>\nUnescapes a value from jinja\n\n**Kind**: static method of <code>[functions](#module_functions)</code>  \n\n| Param | Type |\n| --- | --- |\n| value | <code>\\*</code> | \n\n","readmeFilename":"readme.md"}