Comments (5)
@char0n this sounds reasonable, I think we should go this way
from ramda-adjunct.
Hi!
Thank you for the detailed issue description.
I'm working on it.
from ramda-adjunct.
Hi Guys,
I'm inclined to use R.replace
as base for implementation for replaceAll
ponyfill. The logic for special cases is complicated and it just seems unnecessary to re-implement it.
I'm suggesting following algorithm:
var find = 'abc';
var replace = 'a';
var re = new RegExp(RA.isRegExp(find) ? find : RA.escapeRegExp(find) , 'g');
R.replace(re, replace, 'abc.abc.abc');
If the search pattern is string we escape it and create a global regex pattern from it. If it's already regex we just convert it to global regex.
@js636f what do say ? With this solution we avoid complexities of implementing the logic.
from ramda-adjunct.
Fix is on master.
from ramda-adjunct.
Thank you!
from ramda-adjunct.
Related Issues (20)
- Fix invokeArgs typings
- clamp HOT 4
- can not install v2.31.0 - post install - husky install failes HOT 2
- Add .mocharc.js and .husky to .npmignore HOT 2
- Typo in the documentation HOT 3
- Discontinue using of `test/shared`
- Add support for [email protected] HOT 2
- Make this library usable in denoland
- Cannot read property 'length' of undefined HOT 3
- Cannot re-export all of ramda-adjunct in TypeScript HOT 3
- Make CI run on Node 18 HOT 1
- Remove .nvmrc from npm package
- Add support for [email protected] HOT 1
- allP types are wrong HOT 2
- Switch CI to Node.js@22
- Move `isCoercible` to public API
- Add explicit support for [email protected] HOT 1
- Dependabot: autoupdate GitHub Actions HOT 1
- Use latest codecov HOT 1
- Add support for [email protected]
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 ramda-adjunct.