This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
window.addEventListener('klaviyoForms', function(e){ | |
if (typeof analytics != 'undefined' && e.detail.type === 'stepSubmit' && e.detail.metaData) { | |
console.debug('klaviyoForms: ', e.detail.metaData); | |
if (e.detail.metaData.$email) { | |
const userId = ''; | |
const traits = { | |
email: e.detail.metaData.$email, | |
accepts_email_marketing: true | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def isValidBinaryString(String list) { | |
def total = list?.size() | |
// TODO check one or more 0's or 1's with regex: \[0|1]+\g 🤔 | |
if (total == 0 || total % 2 != 0) { | |
return false | |
} | |
// The number of 0's is equal to the number of 1's. | |
if (list.findAll { it == '1' }?.size() != list.findAll { it == '0' }?.size()) { | |
return false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('Ahora si! 🚀') |