<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
</body>
</html>
list = """
Murkowski, Lisa - (R - AK) Ph:(202) 224-6665
Sullivan, Daniel - (R - AK) Ph:(202) 224-3004
Sessions, Jeff - (R - AL) Ph:(202) 224-4124
Shelby, Richard C. - (R - AL) Ph:(202) 224-5744
Boozman, John - (R - AR) Ph:(202) 224-4843
Cotton, Tom - (R - AR) Ph:(202) 224-2353
Flake, Jeff - (R - AZ) Ph:(202) 224-4521
McCain, John - (R - AZ) Ph:(202) 224-2235
Boxer, Barbara - (D - CA) Ph:(202) 224-3553
Feinstein, Dianne - (D - CA) Ph:(202) 224-3841
Bennet, Michael F. - (D - CO) Ph:(202) 224-5852
Gardner, Cory - (R - CO) Ph:(202) 224-5941
Blumenthal, Richard - (D - CT) Ph:(202) 224-2823
Murphy, Christopher - (D - CT) Ph:(202) 224-4041
Carper, Thomas R. - (D - DE) Ph:(202) 224-2441
Coons, Christopher A. - (D - DE) Ph:(202) 224-5042
Nelson, Bill - (D - FL) Ph:(202) 224-5274
Rubio, Marco - (R - FL) Ph:(202) 224-3041
Isakson, Johnny - (R - GA) Ph:(202) 224-3643
Perdue, David - (R - GA) Ph:(202) 224-3521
Hirono, Mazie K. - (D - HI) Ph:(202) 224-6361
Schatz, Brian - (D - HI) Ph:(202) 224-3934
Ernst, Joni - (R - IA) Ph:(202) 224-3254
Grassley, Chuck - (R - IA) Ph:(202) 224-3744
Crapo, Mike - (R - ID) Ph:(202) 224-6142
Risch, James E. - (R - ID) Ph:(202) 224-2752
Durbin, Richard J. - (D - IL) Ph:(202) 224-2152
Kirk, Mark - (R - IL) Ph:(202) 224-2854
Coats, Daniel - (R - IN) Ph:(202) 224-5623
Donnelly, Joe - (D - IN) Ph:(202) 224-4814
Moran, Jerry - (R - KS) Ph:(202) 224-6521
Roberts, Pat - (R - KS) Ph:(202) 224-4774
McConnell, Mitch - (R - KY) Ph:(202) 224-2541
Paul, Rand - (R - KY) Ph:(202) 224-4343
Cassidy, Bill - (R - LA) Ph:(202) 224-5824
Vitter, David - (R - LA) Ph:(202) 224-4623
Markey, Edward J. - (D - MA) Ph:(202) 224-2742
Warren, Elizabeth - (D - MA) Ph:(202) 224-4543
Cardin, Benjamin L. - (D - MD) Ph:(202) 224-4524
Mikulski, Barbara A. - (D - MD) Ph:(202) 224-4654
Collins, Susan M. - (R - ME) Ph:(202) 224-2523
King, Angus S., Jr. - (I - ME) Ph:(202) 224-5344
Peters, Gary - (D - MI) Ph:(202) 224-6221
Stabenow, Debbie - (D - MI) Ph:(202) 224-4822
Franken, Al - (D - MN) Ph:(202) 224-5641
Klobuchar, Amy - (D - MN) Ph:(202) 224-3244
Blunt, Roy - (R - MO) Ph:(202) 224-5721
McCaskill, Claire - (D - MO) Ph:(202) 224-6154
Cochran, Thad - (R - MS) Ph:(202) 224-5054
Wicker, Roger F. - (R - MS) Ph:(202) 224-6253
Daines, Steve - (R - MT) Ph:(202) 224-2651
Tester, Jon - (D - MT) Ph:(202) 224-2644
Burr, Richard - (R - NC) Ph:(202) 224-3154
Tillis, Thom - (R - NC) Ph:(202) 224-6342
Heitkamp, Heidi - (D - ND) Ph:(202) 224-2043
Hoeven, John - (R - ND) Ph:(202) 224-2551
Fischer, Deb - (R - NE) Ph:(202) 224-6551
Sasse, Ben - (R - NE) Ph:(202) 224-4224
Ayotte, Kelly - (R - NH) Ph:(202) 224-3324
Shaheen, Jeanne - (D - NH) Ph:(202) 224-2841
Booker, Cory A. - (D - NJ) Ph:(202) 224-3224
Menendez, Robert - (D - NJ) Ph:(202) 224-4744
Heinrich, Martin - (D - NM) Ph:(202) 224-5521
Udall, Tom - (D - NM) Ph:(202) 224-6621
Heller, Dean - (R - NV) Ph:(202) 224-6244
Reid, Harry - (D - NV) Ph:(202) 224-3542
Gillibrand, Kirsten E. - (D - NY) Ph:(202) 224-4451
Schumer, Charles E. - (D - NY) Ph:(202) 224-6542
Brown, Sherrod - (D - OH) Ph:(202) 224-2315
Portman, Rob - (R - OH) Ph:(202) 224-3353
Inhofe, James M. - (R - OK) Ph:(202) 224-4721
Lankford, James - (R - OK) Ph:(202) 224-5754
Merkley, Jeff - (D - OR) Ph:(202) 224-3753
Wyden, Ron - (D - OR) Ph:(202) 224-5244
Casey, Robert P., Jr. - (D - PA) Ph:(202) 224-6324
Toomey, Patrick J. - (R - PA) Ph:(202) 224-4254
Reed, Jack - (D - RI) Ph:(202) 224-4642
Whitehouse, Sheldon - (D - RI) Ph:(202) 224-2921
Graham, Lindsey - (R - SC) Ph:(202) 224-5972
Scott, Tim - (R - SC) Ph:(202) 224-6121
Rounds, Mike - (R - SD) Ph:(202) 224-5842
Thune, John - (R - SD) Ph:(202) 224-2321
Alexander, Lamar - (R - TN) Ph:(202) 224-4944
Corker, Bob - (R - TN) Ph:(202) 224-3344
Cornyn, John - (R - TX) Ph:(202) 224-2934
Cruz, Ted - (R - TX) Ph:(202) 224-5922
Hatch, Orrin G. - (R - UT) Ph:(202) 224-5251
Lee, Mike - (R - UT) Ph:(202) 224-5444
Kaine, Tim - (D - VA) Ph:(202) 224-4024
Warner, Mark R. - (D - VA) Ph:(202) 224-2023
Leahy, Patrick J. - (D - VT) Ph:(202) 224-4242
Sanders, Bernard - (I - VT) Ph:(202) 224-5141
Cantwell, Maria - (D - WA) Ph:(202) 224-3441
Murray, Patty - (D - WA) Ph:(202) 224-2621
Baldwin, Tammy - (D - WI) Ph:(202) 224-5653
Johnson, Ron - (R - WI) Ph:(202) 224-5323
Capito, Shelley Moore - (R - WV) Ph:(202) 224-6472
Manchin, Joe, III - (D - WV) Ph:(202) 224-3954
Barrasso, John - (R - WY) Ph:(202) 224-6441
Enzi, Michael B. - (R - WY) Ph:(202) 224-3424
"""
pad = (str, len) ->
str += " " for x in [0..(len-str.length)]
str
newLines = for line in list.split("\n")
[all,lastName,firstNameEtc,party,state,number] = line.match(/^([^,]+), ([^-]+)- \(([A-Z]) - ([A-Z]{2})\) Ph:(.*)$/)
"#{state} (#{party}) #{pad(lastName + ',' + firstNameEtc,25)} Ph: #{number} "
console.log newLines.join("\n")
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |