GithubHelp home page GithubHelp logo

punycode-url's Introduction

punycode-url

Travis build status Coveralls NPM version Canonical Code Style Twitter Follow

Encodes/ decodes URLs to punycode/ unicode.

Usage

import punycodeUrl from 'punycode-url';

punycodeUrl.toASCII('//gájùs.gájùs.com');
// '//xn--gjs-ela5j.xn--gjs-ela5j.com'

punycodeUrl.toUnicode('//xn--gjs-ela5j.xn--gjs-ela5j.com');
// '//gájùs.gájùs.com'

punycode-url's People

Contributors

gajus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

punycode-url's Issues

`import` doesn't work (with Rollup)

[!] RollupError: "default" is not exported by "node_modules/.pnpm/[email protected]/node_modules/punycode-url/dist/index.js", imported by "scripts/src/popup.js".
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
scripts/src/popup.js (1:7)
1: import punycodeUrl from 'punycode-url'
          ^
2: 
3: const [currentTab] = await chrome.tabs.query({
RollupError: "default" is not exported by "node_modules/.pnpm/[email protected]/node_modules/punycode-url/dist/index.js", imported by "scripts/src/popup.js".
    at error (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:210:30)
    at Module.error (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:13438:16)
    at Module.traceVariable (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:13804:29)
    at ModuleScope.findVariable (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:12336:39)
    at MemberExpression.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:9491:49)
    at CallExpression.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:6105:23)
    at CallExpression.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:9822:15)
    at AssignmentExpression.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:6105:23)
    at ExpressionStatement.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:6105:23)
    at Program.bind (/home/alex/Projects/chrome-exts/reload-by-url/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:6101:28)

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.