smooth-text-rotator
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,1 +0,1 @@ | ||
export declare function isArrayOfString(arg: any): arg is string[]; | ||
export declare function isArrayOfString(arg: unknown): arg is string[]; |
{ | ||
"name": "smooth-text-rotator", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Super simple JS library for rotating text with smooth animations", | ||
@@ -31,5 +31,4 @@ "author": "Branchard <benoit.branchard@gmail.com>", | ||
"@typescript-eslint/parser": "^5.1.0", | ||
"esbuild": "^0.13.8", | ||
"eslint": "^8.1.0", | ||
"jest": "^27.3.1", | ||
"resize-observer-polyfill": "^1.5.1", | ||
"ts-jest": "^27.0.7", | ||
@@ -36,0 +35,0 @@ "typedoc": "^0.22.6", |
import {TextRotator} from './text-rotator' | ||
import ResizeObserver from 'resize-observer-polyfill'; | ||
global.ResizeObserver = ResizeObserver; | ||
// Mock resize observer | ||
const mockResizeObserver = jest.fn(); | ||
mockResizeObserver.mockReturnValue({ | ||
observe: () => null, | ||
unobserve: () => null, | ||
disconnect: () => null | ||
}); | ||
global.ResizeObserver = mockResizeObserver; | ||
// Mock intersection observer | ||
const mockIntersectionObserver = jest.fn(); | ||
mockIntersectionObserver.mockReturnValue({ | ||
observe: () => null, | ||
unobserve: () => null, | ||
disconnect: () => null | ||
}); | ||
global.IntersectionObserver = mockIntersectionObserver; | ||
const domBody = | ||
@@ -7,0 +22,0 @@ '<h1>' + |
@@ -18,3 +18,3 @@ import {isArrayOfString} from "./type-guards"; | ||
private intervalID: number | null = null; | ||
private started: boolean = false; | ||
private started = false; | ||
@@ -21,0 +21,0 @@ constructor(options: Options) { |
@@ -1,3 +0,3 @@ | ||
export function isArrayOfString(arg: any): arg is string[] { | ||
export function isArrayOfString(arg: unknown): arg is string[] { | ||
return Array.isArray(arg) && arg.every(i => (typeof i === "string")); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20743
10
389