This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
external-link with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
A simple function that tells you whether a link DOM node is 'external'.
A link is external if it:
var external = require('external-link'); var link = document.querySelector('a'); external(link);
2.0.0 - changed handling of target so that any value other than _self will make it external