Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h1><a href="https://deepdash.io/"><img width="40%" src="https://cdn.jsdelivr.net/npm/deepdash@latest/deepdash.full.svg"></a></h1>
<blockquote>➔ 𝐃eep standalone lib / 𝐋odash extension: ✓ eachDeep ✓ filterDeep ✓ mapDeep ✓ reduceDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parents stack ⋮ Circular check ⋮ Leaves only mode ⋮ Children mode ⋮ cherry-pick ⋮ esm</blockquote>
<h1><a href="https://deepdash.io/#pathtostring">pathToString</a> - convert array path to string</h1>
<div id="console"></div>
              
            
!

CSS

              
                body{
  background-color: #002b36;
  color: #CCC;
  padding:20px;
}
h1 {
  font-size:32px;
  a{
    font-size:48px;
  }
}
a {
  color:#0078dc;
}
#console {
  input[type=checkbox]{
    display:none;
  }
  .title {
    margin-bottom: 6px;    
  }
  label{
    cursor:pointer;
    color: #CCC;
    .collapse {
      display:none;
    }
    .expand {
      display:inline;
    }
  }
  input[type=checkbox]:checked + .title label {
    color: #CCC;
    .collapse {
      display:inline;
    }
    .expand {
      display:none;
    }
  }
  
  pre {
    display: none;
    border: 1px dashed #CCC;
    margin-top: 0px;
    margin-bottom:40px;
  }
  input[type=checkbox]:checked + .title + pre {
    display: block;
  }
  margin-top:10px;
  padding:5px;
  font-family: monospace;
  color:teal;
}

              
            
!

JS

              
                deepdash(_); // mixin Deepdash methods into Lodash

var data = ['a', 'b', 'c', 'defg', 0, '1', 2.3];
log('path in array format',"['a', 'b', 'c', 'defg', 0, '1', 2.3]");
var path = _.pathToString(data);
log('string path',path);


data = ['"', '"', '"'];
log('path in array format',"['\"', '\"', '\"']");
path = _.pathToString(data);
log('string path',path);

data = 'it.s.a.string';
log('path in array format',"it.s.a.string");
path = _.pathToString(data);
log('string path',path);





































// boring stuff
var consoleEl;
var consoleN=0;

function log(title, txt, collapsed){
  if(!consoleN)
    consoleN=1
  else
    consoleN++;
  if(!consoleEl){
    consoleEl = document.getElementById('console');
  }
  var toggleEl = document.createElement("input");
  toggleEl.setAttribute('type','checkbox');
  toggleEl.setAttribute('id','con-'+consoleN);
  toggleEl.checked=!collapsed;
  var titleEl = document.createElement("div");
  titleEl.classList.add('title');
  titleEl.innerHTML = '<label for="con-'+consoleN+'"><span class="expand">›››</span><span class="collapse">‹‹‹</span>'+' '+title+'<span class="expand">...</span></label>';
  consoleEl.appendChild(toggleEl);
  consoleEl.appendChild(titleEl);
  if(txt===undefined) return;
  
  if(_.isArray(txt))
    txt = txt.join('\n');
  var block = document.createElement("pre");
  block.innerHTML='<code>'+txt+'</code>';
  hljs.highlightBlock(block);
  
  consoleEl.appendChild(block);
}


function logJSON(title,data,collapsed){
  return log(title,JSON.stringify(data,null,2),collapsed);
}
              
            
!
999px

Console