Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lightningtv/core

Package Overview
Dependencies
Maintainers
0
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningtv/core - npm Package Compare versions

Comparing version 2.4.4 to 2.4.5

7

dist/src/focusManager.js
import { Config } from './config.js';
import { isFunction } from './utils.js';
const keyMapEntries = {

@@ -110,3 +111,4 @@ ArrowLeft: 'Left',

const onKeyHandler = elm[`on${mappedEvent}`];
if (onKeyHandler?.call(elm, e, elm, finalFocusElm) === true) {
if (isFunction(onKeyHandler) &&
onKeyHandler.call(elm, e, elm, finalFocusElm) === true) {
break;

@@ -119,3 +121,4 @@ }

const fallbackFunction = isHold ? elm.onKeyHold : elm.onKeyPress;
if (fallbackFunction?.call(elm, e, mappedEvent, elm, finalFocusElm) === true) {
if (isFunction(fallbackFunction) &&
fallbackFunction.call(elm, e, mappedEvent, elm, finalFocusElm) === true) {
break;

@@ -122,0 +125,0 @@ }

@@ -6,2 +6,3 @@ import { INode } from '@lightningjs/renderer';

export declare const isFunc: (obj: unknown) => obj is CallableFunction;
export declare const isFunction: (obj: unknown) => obj is Function;
export declare function isObject(item: unknown): item is Record<string | number | symbol, unknown>;

@@ -8,0 +9,0 @@ export declare function isArray(item: unknown): item is any[];

@@ -15,2 +15,3 @@ import { Config, isDev } from './config.js';

export const isFunc = (obj) => obj instanceof Function;
export const isFunction = (obj) => typeof obj === 'function';
export function isObject(item) {

@@ -17,0 +18,0 @@ return typeof item === 'object';

{
"name": "@lightningtv/core",
"version": "2.4.4",
"version": "2.4.5",
"description": "Lightning TV Core for Universal Renderers",

@@ -5,0 +5,0 @@ "type": "module",

@@ -11,2 +11,3 @@ import { Config } from './config.js';

} from './focusKeyTypes.js';
import { isFunction } from './utils.js';

@@ -149,4 +150,7 @@ declare module '@lightningtv/core' {

if (mappedEvent) {
const onKeyHandler = elm[`on${mappedEvent}`] as KeyHandler;
if (onKeyHandler?.call(elm, e, elm, finalFocusElm) === true) {
const onKeyHandler = elm[`on${mappedEvent}`];
if (
isFunction(onKeyHandler) &&
onKeyHandler.call(elm, e, elm, finalFocusElm) === true
) {
break;

@@ -159,3 +163,4 @@ }

if (
fallbackFunction?.call(elm, e, mappedEvent, elm, finalFocusElm) === true
isFunction(fallbackFunction) &&
fallbackFunction.call(elm, e, mappedEvent, elm, finalFocusElm) === true
) {

@@ -162,0 +167,0 @@ break;

@@ -26,2 +26,5 @@ import { INode } from '@lightningjs/renderer';

export const isFunction = (obj: unknown): obj is Function =>
typeof obj === 'function';
export function isObject(

@@ -28,0 +31,0 @@ item: unknown,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc