Socket
Book a DemoInstallSign in
Socket

local-links

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

local-links - npm Package Compare versions

Comparing version

to
1.0.4

2

package.json
{
"name": "local-links",
"description": "Determine cross-browser if an event or anchor element should be handled locally.",
"version": "1.0.3",
"version": "1.0.4",
"author": "Luke Karrys <luke@lukekarrys.com>",

@@ -6,0 +6,0 @@ "bugs": {

@@ -60,3 +60,3 @@ local-links

- `pathname(Event or HTMLElement [, HTMLElement])`
#### `pathname(Event or HTMLElement [, HTMLElement])`

@@ -66,3 +66,3 @@ Returns the pathname if it is a non-hash local link, or null if it is not.

- `hash(Event or HTMLElement [, HTMLElement])`
#### `hash(Event or HTMLElement [, HTMLElement])`

@@ -72,3 +72,3 @@ Returns the hash if it is an in-page hash link, or null if it is not. Always

- `active(Event or HTMLElement [, comparePath])`
#### `active(Event or HTMLElement [, comparePath])`

@@ -79,7 +79,7 @@ Returns true/false depending on if the anchor pathname is equal to the `comparePath`

#### Supply either Event or HTMLElement (or both!)
#### Supply either Event or HTMLElement
Both the above methods will accept an `Event` object, like the one you get from
event handlers, or any `HTMLElement`. You can also supply an `Event` object
and your own `HTMLElement` as the second parameter and it will take precedence.
The above methods will accept an `Event` object, like the one you get from
click event handlers, or any `HTMLElement`. You can also supply an `Event` object
and a different `HTMLElement` as the second parameter and it will take precedence.

@@ -99,3 +99,3 @@ If only an `Event` object is supplied, the `HTMLElement` will be found from

If an `Event` object is supplied, all methods will return `null` if any of the following
are true `altKey`, `ctrlKey`, `metaKey`, `shiftKey. This is because you almost always
are true `altKey`, `ctrlKey`, `metaKey`, `shiftKey`. This is because you almost always
want to treat modified click events as external page clicks.

@@ -117,4 +117,4 @@

### License
#### License
MIT
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.