Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
tailwind-type-generator
Advanced tools
Simply exports type declaration file of Tailwind CSS classnames.
This library just exports tailwind.d.ts
from tailwind.config.js
.
It has TailwindClassNames
type that lists Tailwind CSS class names.
npm install --save-dev tailwind-type-generator
# peerDependencies
npm install --save tailwindcss
Example project is ./example.
Fist, export tailwind.d.ts
.
npx tailwind-type-generator
Then create utility function and call from components.
// lib/tailwind.ts
type TailwindReturnType = "__TAILWIND";
type TailwindParamType = TailwindClassNames | TailwindReturnType;
export const tailwind = (...classNames: TailwindParamType[]) => {
return classNames.join(" ") as TailwindReturnType;
};
export const tw = tailwind;
// component.tsx
import { tailwind, tw } from "./lib/tailwind";
const textStyle = tailwind("text-white", "text-xl");
export default function () {
<div classNames={tw("bg-black", "w-full", "h-full", textStyle)} />;
}
FAQs
Generate type definition file of Tailwind CSS classnames.
The npm package tailwind-type-generator receives a total of 0 weekly downloads. As such, tailwind-type-generator popularity was classified as not popular.
We found that tailwind-type-generator 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.