Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@hookun/parse-animation-shorthand
Advanced tools
A parser for the value of CSS animation shorthand property.
A parser for The animation shorthand CSS property.
npm install @hookun/parse-animation-shorthand
string
) → Array<CSSAnimation>
import {parse} from '@hookun/parse-animation-shorthand';
const result = parse('3s ease-in SlideIn, .2s .1s ease FadeIn');
const expectedResult = [
{
name: 'SlideIn',
duration: 3000,
delay: 'unset',
timingFunction: 'ease-in',
iterationCount: 'unset',
direction: 'unset',
fillMode: 'unset',
playState: 'unset',
},
{
name: 'FadeIn',
duration: 200,
delay: 100,
timingFunction: 'ease',
iterationCount: 'unset',
direction: 'unset',
fillMode: 'forwards',
playState: 'unset',
},
];
CSSAnimation
) → string
import {serialize} from '@hookun/parse-animation-shorthand';
const result = serialize({
name: 'SlideIn',
duration: 3000,
delay: 'unset',
timingFunction: 'ease-in',
iterationCount: 'unset',
direction: 'unset',
fillMode: 'unset',
playState: 'unset',
});
const expectedResult = '3s ease-in SlideIn';
CSSAnimation
?interface CSSAnimation {
name: string
duration: number | Unset
timingFunction: CSSTimingFunction | Unset
delay: number | Unset
iterationCount: number | 'infinite' | Unset
direction: CSSAnimationDirection | Unset
fillMode: CSSAnimationFillMode | Unset
playState: CSSAnimationPlayState | Unset
}
type Unset = 'unset'
type CSSTimingFunction =
| CSSTimingFunctionKeyword
| CSSCubicBezier
| CSSSteps
type CSSTimingFunctionKeyword =
| 'ease'
| 'ease-in'
| 'ease-out'
| 'ease-in-out'
| 'linear'
| 'step-start'
| 'step-end'
interface CSSCubicBezier {
type: 'cubic-bezier'
value: [number, number, number, number]
}
interface CSSSteps {
type: 'steps'
stepCount: number
direction: CSSStepDirection
}
type CSSStepDirection =
| 'jump-start'
| 'jump-end'
| 'jump-none'
| 'jump-both'
| 'start'
| 'end'
type CSSAnimationDirection =
| 'normal'
| 'reverse'
| 'alternate'
| 'alternate-reverse';
type CSSAnimationFillMode =
| 'none'
| 'forwards'
| 'backwards'
| 'both'
type CSSAnimationPlayState =
| 'paused'
| 'running'
FAQs
A parser for the value of CSS animation shorthand property.
The npm package @hookun/parse-animation-shorthand receives a total of 873 weekly downloads. As such, @hookun/parse-animation-shorthand popularity was classified as not popular.
We found that @hookun/parse-animation-shorthand demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.