Skip to content

Instantly share code, notes, and snippets.

@artemkin
Created September 11, 2015 19:07
Show Gist options
  • Save artemkin/5ecdb060191c5923cb72 to your computer and use it in GitHub Desktop.
Save artemkin/5ecdb060191c5923cb72 to your computer and use it in GitHub Desktop.
var toType = function(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}
function stringToArray(str) {
var arr = [];
for (var i = 0; i < str.length; ++i)
arr.push(str.charCodeAt(i));
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment