Git Product home page Git Product logo

url-knife's Issues

SyntaxError: Cannot use import statement outside a module

Thanks for making this lib! It works beautifully in create-react-app but not in next. Would you have any suggestions for how to rectify this?

Thank you so much!

import Pattern from "url-knife";
SyntaxError: Cannot use import statement outside a module

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
external%20%22url-knife%22 (1:0) @ eval

> 1 | module.exports = require("url-knife");

Url does not pass as expected

This url: https://www.php.net/manual/en/language.oop5.overloading.php#object.call

Gives these results:

{ "value": { "url": "https://www.php.net/manual/en/language.oop5.overloading.php#object.call", "normalizedUrl": "https://www.ph/manual/en/language.oop5.overloading.php#object.call", "removedTailOnUrl": "", "protocol": "https", "onlyDomain": "www.ph", "onlyParams": null, "onlyUri": "/manual/en/language.oop5.overloading.php#object.call", "onlyUriWithParams": "/manual/en/language.oop5.overloading.php#object.call", "onlyParamsJsn": null, "type": "domain", "port": null }, "area": "text" }

When used like so:

Pattern.TextArea.extractAllFuzzyUrls('https://www.php.net/manual/en/language.oop5.overloading.php#object.call');

I'm using this within a browser (firefox 86 on OSX).

I expect the onlyDomain to be www.php.net

Great project btw, just found this bug when messing about with pasting in urls.

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.