You would probably want to do stuff because:
- Stuff is fun
- Stuff is good
| const isPrimitive = obj => | |
| obj === null || | |
| [ 'string', 'number', 'boolean' ].includes( typeof obj ) | |
| const isArrayOfPrimitive = obj => | |
| Array.isArray( obj ) && obj.every( isPrimitive ) | |
| const format = arr => | |
| `^^^[ ${ | |
| arr.map( val => JSON.stringify( val ) ).join( ', ' ) |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch", | |
| "type": "node", | |
| "request": "launch", | |
| "program": "${workspaceRoot}/index.js", | |
| "stopOnEntry": false, | |
| "args": [], |
| interface Predicate<T> { | |
| ( subject:T ): boolean | |
| } | |
| interface DomAdapter<TNode, TElementNode> { | |
| // is the node a tag? | |
| isTag: Predicate<TNode>, | |
| // does at least one of passed nodes pass the test? | |
| existsOne: ( test:Predicate<TElementNode>, nodes:[TNode] ) => boolean, |
| const flatten = array => { | |
| const result = [] | |
| const nodes = array.slice() | |
| let node | |
| while( nodes.length > 0 ){ | |
| node = nodes.pop() | |
| if( Array.isArray( node ) ){ | |
| nodes.push( ...node ) |
| const dfsIterator = node => { | |
| const nodes = [ node ] | |
| const next = () => { | |
| const done = nodes.length === 0 | |
| if( done ) return { done } | |
| const value = nodes.pop() | |
| let child = value.lastChild |
| const dfsGenerator = function*( node ){ | |
| const nodes = [ node ] | |
| while( nodes.length > 0 ){ | |
| const current = nodes.pop() | |
| yield current | |
| let child = current.lastChild |
| {% assign saved_amount = compare_price | minus: product_price %} | |
| {% comment %} | |
| Unless this store uses multiple currencies, | |
| we will remove the decimals when they are equal to 00, | |
| or when the amount is > 10 (dollars, pounds, etc.). | |
| {% endcomment %} | |
| <!-- using expected price-sale template --> |
| <div id="ProductSection" data-section-id="{{ section.id }}" data-section-type="product-template" data-zoom-toggle="zoom-in" data-zoom-enabled="{{ section.settings.product_image_zoom_enable }}" data-related-enabled="{{ section.settings.product_related_enable }}" data-social-sharing="{{ section.settings.social_sharing }}" data-show-compare-at-price="{{ section.settings.product_show_compare_at_price }}" data-stock="{{ section.settings.product_quantity_message }}" data-incoming-transfer="{{ section.settings.product_incoming_message }}"> | |
| {% include 'breadcrumb' %} | |
| <div class="grid" itemscope itemtype="http://schema.org/Product"> | |
| <meta itemprop="url" content="{{ shop.url }}{{ product.url }}"> | |
| <meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}"> | |
| <div class="grid-item large--two-fifths"> | |
| <div class="grid"> | |
| <div class="grid-item large--eleven-twelfths text-center"> |
| $(document).ready(function () { | |
| var galleryCheck = $("div.gallery_sef").length; | |
| if( !galleryCheck ) return; | |
| var extensions = ["_pico.", "_icon.", "_thumb.", "_small.", "_compact.", "_medium.", "_large.", "_grande.", "_1024x1024.", "_2048x2048." ]; | |
| $("div.gallery_sef img").each(function(){ | |
| var $img = $(this); | |
| var src = $img.attr('src'); |