LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code


Online Lodash Tester

Testing Lodash version

This is an online tester for the Lodash Library. Simply type your code in the box below and press Execute. It will run your code and then show the results in the Results section.

Brought to you with by .

Lodash Code

Enter your code below. Set the value of result to what you would like to show in the results section.

Example:
var users = [
  { user: 'barney', age: 36, active: true },
  { user: 'fred',  age: 40, active: false },
  { user: 'travis', age: 37, active: true}
];

result = _.filter(users, function(o) { return o.active; });
      

Execute
Result:

    

Brought to you by Form.io

JS
$('#version').text(_.VERSION);
window._ = _;
$(function() {
  $('#execute').click(function() {
    var code = $('#code').val();
    var result = null;
    try {
      result = eval(code);
    }
    catch (err) {
      result = err.message;
    }
    if (!result) {
      result = 'No result';
    }
    if (typeof result === 'object') {
      try {
        result = JSON.stringify(result, null, '   '); 
      }
      catch (err) {
        result = err.message;
      }
    }
    $('#result').text(result);
  });
});
Host Instantly Drag and Drop Website Builder

 

Description

Allows you to run lodash code within the browser.
Term
Mon, 11/27/2017 - 22:00

Related Codes

Pen ID
Pen ID
Pen ID