Comments (7)
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.
PR welcome
from url-regex-safe.
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.
@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.
Why prefer second over the first?
You can not run native modules in the browser. You can run WASM though.
from url-regex-safe.
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.
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)
- Regex not matching URLS HOT 1
- Invalid port HOT 2
- Issue with Email Addresses Getting pulled In HOT 4
- Not working with TypeScript HOT 3
- trailingPeriod setting not honored on subdomains HOT 7
- re2 breaks builds HOT 2
- Capture group support?
- url regex unsafe HOT 1
- Install fails because "re2" dependency can't find Python HOT 3
- jest malloc errors HOT 6
- Extra characters at the end HOT 3
- Add option to not use `re2` even if it's in the dependency tree HOT 3
- Support closing parentheses in URLs do not match HOT 3
- [fix] Invalid protocols are matched HOT 2
- Grab safe-url-regex to prevent type-squatting HOT 1
- Matches email addresses (within a larger string) with default options HOT 3
- High CPU usage compared to 'url-regex' HOT 1
- Fails to install on MacOS with M1 processors HOT 2
- closing bracket on wikipedia links is ignored HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from url-regex-safe.