This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bouncer(arr) { | |
// Don't show a false ID to this bouncer. | |
return arr.filter(Boolean); | |
} | |
bouncer([7, "ate", "", false, 9]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function destroyer(arr) { | |
// Remove all the values | |
var args = Array.prototype.slice.call(arguments); | |
for(var i = 0; i < arr.length; i++){ | |
for(var j = 0; j < args.length; j++){ | |
if(arr[i] === args[j]){ | |
delete arr[i]; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getIndexToIns(arr, num) { | |
var added = arr.push(num); | |
var sortArr = arr.sort(function(a, b) { | |
return a - b; | |
}); | |
var index = sortArr.indexOf(num); | |
return index; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rot13(str) { // LBH QVQ VG! | |
debugger; | |
var newArr = []; | |
for(var i = 0; i < str.length; i++){ | |
var letter = str.charCodeAt(i); | |
if (64 < letter && letter < 78){ | |
newArr.push(String.fromCharCode(letter+13)); | |
} | |
else if(77 < letter && letter < 91){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [ ]; | |
a["13"] = 42; | |
a.length; // 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function spinalCase(str) { | |
//1. remove spaces, add - | |
//2. add - where capital letter | |
//3. remove underscore, add - | |
//4. remove spaces, add - | |
//5. remove | |
var newStr = str.replace(/ ([A-Z])/g, '-$1'); | |
newStr = newStr.replace(/\s|_/g, '-'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function steamrollArray(arr) { | |
// I'm a steamroller, baby | |
var global_arr = []; | |
function extract(arr) { | |
for(var i=0; i < arr.length; i++) { | |
if(Array.isArray(arr[i])) { | |
extract(arr[i]); | |
} else { | |
global_arr.push(arr[i]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This site is converting visitors into subscribers and customers with OptinMonster - https://optinmonster.com :: Campaign Title: amica medical supply --><div id="om-tnglw36uwq6xow74y69p-holder"></div><script>var tnglw36uwq6xow74y69p,tnglw36uwq6xow74y69p_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){tnglw36uwq6xow74y69p_poll(function(){if(window['om_loaded']){if(!tnglw36uwq6xow74y69p){tnglw36uwq6xow74y69p=new OptinMonsterApp();return tnglw36uwq6xow74y69p.init({"u":"21286.708662","staging":0,"dev":0,"beta":0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src="https://a.optnmstr.com/app/js/api.min.js",o.async=true,o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){try{d=om_loaded=true;tnglw36uwq6xow74y69p=new OptinMonsterApp();tnglw36uwq6xow74y69p.init({"u":"21286.708662","staging":0,"dev":0,"beta":0});o.onload=o.onreadystatechange=null;}catc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Josephs-MacBook-Pro:call-forwarding-node-master josephprevite$ yarn install | |
yarn install v1.3.2 | |
info No lockfile found. | |
[1/4] 🔍 Resolving packages... | |
warning sequelize-cli > gulp > vinyl-fs > graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js | |
warning sequelize-cli > gulp > vinyl-fs > glob-stream > minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
warning sequelize-cli > gulp > vinyl-fs > glob-watcher > gaze > globule > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
warning sequelize-cli > gulp > vinyl-fs > glob-watcher > gaze > globule > glob > graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js | |
[2/4] 🚚 Fetching packages... | |
[3/4] 🔗 Linking dependencies... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Josephs-MacBook-Pro:~ josephprevite$ npm install --global yarn | |
npm WARN deprecated yarn@1.3.2: It is recommended to install Yarn using the native installation method for your environment. See https://yarnpkg.com/en/docs/install | |
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js | |
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js | |
+ yarn@1.3.2 | |
updated 1 package in 0.929s | |
Josephs-MacBook-Pro:~ josephprevite$ brew install yarn | |
Updating Homebrew... | |
==> Auto-updated Homebrew! | |
Updated 1 tap (homebrew/core). |
OlderNewer