Skip to content

Instantly share code, notes, and snippets.

View sogrbilja's full-sized avatar

Dejan sogrbilja

View GitHub Profile
@refo
refo / remove-leading-slash
Created June 5, 2015 13:27
javascript - Remove leading slashes
'/example/string/'.replace(/^\/+/g, '');
// Should remove all leading slashes and return 'example/string/'