snipt

Ctrl+h for KB shortcuts

Bash

List all npm versions for a package

npm view [<@scope>/]<package> time
https://snipt.net/embed/d170797a6d229963bc80c47573a7de66/
/raw/d170797a6d229963bc80c47573a7de66/
d170797a6d229963bc80c47573a7de66
bash
Bash
1
2019-07-16T07:55:03
True
False
False
/api/public/snipt/147548/
list-all-npm-versions-for-a-package
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>npm view <span class="o">[</span>&lt;@scope&gt;/<span class="o">]</span>&lt;package&gt; <span class="nb">time</span> </span></pre></div> </td></tr></table>
javascript, node.js, npm

Text only

Date Today

1
2
3
    var date = new Date();
    var today = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
    var today_formated = (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear();
https://snipt.net/embed/ad55330d8c79709d50697430965a79a7/
/raw/ad55330d8c79709d50697430965a79a7/
ad55330d8c79709d50697430965a79a7
text
Text only
4
2019-07-19T18:08:41
True
False
False
/api/public/snipt/147414/
date-today
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a> var date = new Date(); </span><span id="L-2"><a name="L-2"></a> var today = date.getFullYear() + &#39;-&#39; + (date.getMonth() + 1) + &#39;-&#39; + date.getDate(); </span><span id="L-3"><a name="L-3"></a> var today_formated = (date.getMonth() + 1) + &#39;/&#39; + date.getDate() + &#39;/&#39; + date.getFullYear(); </span></pre></div> </td></tr></table>
javascript

Text only

JavaScript Foreach

1
2
3
for (var i in bearings){
	var item = bearings[i];
}
https://snipt.net/embed/39a60d2021270ce207df97bf0a5cd4f5/
/raw/39a60d2021270ce207df97bf0a5cd4f5/
39a60d2021270ce207df97bf0a5cd4f5
text
Text only
4
2019-07-20T05:36:42
True
False
False
/api/public/snipt/147285/
javascript-foreach-ad42fdc9
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>for (var i in bearings){ </span><span id="L-2"><a name="L-2"></a> var item = bearings[i]; </span><span id="L-3"><a name="L-3"></a>} </span></pre></div> </td></tr></table>
javascript