RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Sanitize your strings in JavaScript like a Rails developer

What if you could write JavaScript that gets _really_close to what you can do with Ruby/Rails? https://railsdesigner.com/sanitize-javascript-like-rails/ In this article I creating a sanitize method to clean up content from trailing/leading white-spaces, multiple new lines and essentially whatever else you want (or not!) 🧹

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in