Skip to content

Instantly share code, notes, and snippets.

View curtis-turner's full-sized avatar
💭
Coding Security For The Cloud!

Curtis Turner curtis-turner

💭
Coding Security For The Cloud!
View GitHub Profile
@curtis-turner
curtis-turner / seekanddestroy.js
Created June 14, 2017 04:47
seek and destroy
function destroyer(arr) {
// Remove all the values
//console.log(arguments[1]);
//console.log(arguments[2]);
var newArr = [];
for(var i = 1; i < arguments.length; i++){
newArr.push(arguments[i]);
}
console.log(newArr);
@curtis-turner
curtis-turner / truncateString.js
Created June 11, 2017 18:48
truncate String in javascript
function truncateString(str, num) {
// Clear out that junk in your trunk
var newString = "";
if(num <= 3){
newString = str.slice(0, num) + "...";
}
else{
newString = str.slice(0, num) + "...";
if(newString.length > num){