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
/*Se quiere realizar un AB Testing en el sitio de Chile respecto al despliegue del cuadro "Resumen de tu compra", en donde se busca mostrar, cuando corresponda, la línea de "Ahorro Internet". Uno de nuestros programadores ya diseñó una solución, pero esta tiene algunos defectos: | |
1- El despliegue de la etiqueta no está en el formato correcto (-$XX.XXX.XXX) | |
2- El "Sub-total" debe reflejar el valor total del carro, sin ningún tipo de descuento | |
3- El "Ahorro con CMR" debe incluir tanto los descuentos asociados a la tarjeta, como los descuentos de internet | |
4- Se requiere que cada vez que el carro cambie (cantidades de productos, nuevos productos, etc.) también lo hagan todos los valores del resumen | |
Necesitamos que nos ayudes a solucionar estas deficiencias en el código para poder seguir con el AB Test. Para llevar esto a cabo y realizar las pruebas respectivas te sugerimos utilizar el módulo de "Agregar productos por código" existente en la página del carro de compras, | |
y agregar los sku 555212-5, 160305-1, 8739 |
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
[ | |
{ | |
"id": 38831, | |
"name": "Ucon Acrobatics Unisex Hajo Backpack, Olive Green", | |
"asin": "B06XRYRG4T", | |
"postings_count": 366, | |
"comments_count": 0, | |
"available": true, | |
"editors_note": "", | |
"prime": false, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import { c } from "atomico; | |
function component() { | |
return <host></host>; | |
} | |
component.props = { | |
value: String, | |
checked: { | |
type: Boolean, |
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
import { useCounter } from "./use-counter.js"; | |
function component() { | |
const count = useCounter("count"); | |
return ( | |
<host> | |
<button onclick={count.increment}>+</button> | |
<strong>{count.value}</strong> | |
<button onclick={count.decrement}>-</button> | |
</host> |
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
function component() { | |
const sayHello = () => { | |
console.log("hi!"); | |
}; | |
const handlerClick = () => { | |
console.log("click"); | |
}; | |
return ( |
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
import { c, html } from "atomico"; // 3.0kB | |
function component({ name }) { | |
return html`<host shadowDom>Hello, ${name}</host>`; | |
} | |
component.props = { | |
name: String, | |
}; |
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
const add = (list) => (rule) => list.push(rule) && ""; | |
const cssBlock = /([^}{;]*){([^}{]+)}/; | |
function parse(css) { | |
let blocks = []; | |
let current; | |
while(current = css.match(cssBlock)){ | |
const [fragment,selector,content] = current; | |
const [spaces] = selector.match(/^ */); | |
const { index: start } = current; | |
const { length } = fragment; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
const add = (list: string[]) => (rule: string) => list.push(rule) && ""; | |
function parse(css: string) { | |
const rules = []; | |
const atRules = []; | |
css | |
.replace(/\s+/g, " ") | |
.replace(/@([^{]+)\{(.*?}) *}/g, add(atRules)) | |
.replace(/([^}{;]*){([^}{]+)}/g, add(rules)); |
NewerOlder