<p>
Open powershell and run the script via path.
While you can use the visual studio code powershell plugin, it will only execute scripts from the current path. It's best to cd into the path you want and then just execute the script path from there.
</p>
<p>
Copy from clipboard and paste into vs code as new file. replace empty spaces with single space.
replace backward slash with forward slash.
</p>
<ul>
<li>
Use visual studio code to execute the command in its terminal, it picks up line breaks better when you copy to clipboard
</li>
<li>
cd into the direction you want to run script on
</li>
<li>take out the -Wrap param if you don't need it</li>
<li>type path to the script | Format-Table -Wrap -Autosize </li>
</ul>
JavaScript
var str = ``;
var arr = [];
arr = str.split('\n');
var Item = function(name, size) {
this.name = name;
this.size = size;
}
var items = [];
arr.forEach(obj => {
let tempArr = obj.split(' ');
items.push(new Item(tempArr[0], parseInt(tempArr[2])));
});
let filtered = items.filter(i => i.size > 700000);
var finalStr = '';
filtered.forEach(f => {
finalStr += f.name + ' ' + f.size + '\n';
});
console.log(finalStr);
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.