Giter Club home page Giter Club logo

Comments (7)

pjotrsavitski avatar pjotrsavitski commented on August 15, 2024 1

I'm using it in the browser to create a version of the text that will have any URL's converted into HTML with newlines converted to line breaks. Using a module, which was url-regex, instead of my own regular expression made sense.

Having an API endpoint do that for each of the items in the listing does not seem like a good idea.

from url-regex-safe.

niftylettuce avatar niftylettuce commented on August 15, 2024

PR welcome

from url-regex-safe.

Richienb avatar Richienb commented on August 15, 2024

Are you interested in dropping pre-build tooling and switching to ESM? This would make it easier to get the wasm-reliant code to work.

from url-regex-safe.

pjotrsavitski avatar pjotrsavitski commented on August 15, 2024

@Richienb I tried to understand the difference between re2 and re2-wasm, but the second one seems to be based on the first and does not seem to have any major differences. Both modules seem to be useful on the Node.js server side and will not work within a browser. Why prefer second over the first?

from url-regex-safe.

Richienb avatar Richienb commented on August 15, 2024

Why prefer second over the first?

You can not run native modules in the browser. You can run WASM though.

from url-regex-safe.

niftylettuce avatar niftylettuce commented on August 15, 2024

When would we need url-regex-safe in the browser? Curious what the use cases are. Could just have an API endpoint that takes a string and parses it and returns it and then calls new RegExp with value?

from url-regex-safe.

Richienb avatar Richienb commented on August 15, 2024

For libraries that validate urls before sending a request to them, making the validation an API endpoint would make this redundant. In this case, you might as well send the request in the first place and handle the error.

from url-regex-safe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.