Skip to content

Instantly share code, notes, and snippets.

@neiker
neiker / cuil-validator.ts
Last active April 16, 2024 22:08
Validación de CUIL (Argentina) en TypeScript / JavaScript
export function cuilValidator(cuil: string): boolean {
if (cuil.length !== 11) {
return false;
}
const [checkDigit, ...rest] = cuil
.split('')
.map(Number)
.reverse();
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
<div style="padding: 20px;background: white;margin: 10px;border-radius: 4px;height: 120px;">
<h1 style="font-size: 15px;">Aura Component: Firing Event</h1>
<c:registerEvent name="testevent" namespace="astro" aura:id="first-event"></c:registerEvent>
<lightning:button label="Fire Event From Aura" onclick="{!c.fireEvent}"></lightning:button>
</div>
</aura:component>