Comments (3)
It looks like the double slashes are removed, but the ../.
part is evaluated and the or
segment is removed. Since normalize-path
doesn't do anything with ../.
, I think the URL
function is doing that and causing your test to fail.
Edit: I didn't see the title update until after I posted my comment.
from normalize-path.
Hi @karolisgrinkevicius, here is what this library returns for your path:
const path = require('normalize-path');
console.log(path(('https://example.com/badpath//or/.././subpath//data.json')));
// https:/example.com/badpath/or/.././subpath/data.json
The issue you described, as pointed out by @doowb seems to not be related to this library.
from normalize-path.
@doowb @jonschlinkert thanks for clarifying this. The weird thing is that the unit test didn't fail until I upgraded version of normalize-path
to the latest one 2.1.1
.
from normalize-path.
Related Issues (10)
- Tests fail HOT 6
- Excuse me, please tell me, what's the different between your two project HOT 1
- Normalize path with ".." elements HOT 2
- npm package 1.0.0 is missing tests and license HOT 2
- Use `remove-trailing-separator` module as dependency? HOT 4
- add "../" support HOT 1
- Remove redundant segments from paths HOT 5
- changelog HOT 1
- Missing remove-trailing-separator dependency HOT 1
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 normalize-path.