Socket
Socket
Sign inDemoInstall

@unocss/preset-attributify

Package Overview
Dependencies
Maintainers
1
Versions
366
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/preset-attributify - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

4

dist/index.d.ts

@@ -1,2 +0,2 @@

import { Extractor, Variant, Preset } from '@unocss/core';
import { Extractor, VariantFunction, Preset } from '@unocss/core';

@@ -35,3 +35,3 @@ interface AttributifyOptions {

declare const variantAttributify: (options?: AttributifyOptions) => Variant;
declare const variantAttributify: (options?: AttributifyOptions) => VariantFunction;

@@ -38,0 +38,0 @@ declare const preset: (options?: AttributifyOptions | undefined) => Preset;

@@ -70,19 +70,17 @@ var __create = Object.create;

const prefix = (_a = options.prefix) != null ? _a : "un-";
return {
match(input) {
const match = (0, import_core2.isAttributifySelector)(input);
if (!match)
return;
let name = match[1];
if (name.startsWith(prefix))
name = name.slice(prefix.length);
else if (options.prefixedOnly)
return;
const content = match[2];
const [, variants = "", body = content] = content.match(variantsRE) || [];
if (body === "~" || !body)
return `${variants}${name}`;
else
return `${variants}${name}-${body}`;
}
return (input) => {
const match = (0, import_core2.isAttributifySelector)(input);
if (!match)
return;
let name = match[1];
if (name.startsWith(prefix))
name = name.slice(prefix.length);
else if (options.prefixedOnly)
return;
const content = match[2];
const [, variants = "", body = content] = content.match(variantsRE) || [];
if (body === "~" || !body)
return `${variants}${name}`;
else
return `${variants}${name}-${body}`;
};

@@ -89,0 +87,0 @@ };

{
"name": "@unocss/preset-attributify",
"version": "0.1.5",
"version": "0.2.0",
"description": "",

@@ -31,3 +31,3 @@ "keywords": [],

"dependencies": {
"@unocss/core": "0.1.5"
"@unocss/core": "0.2.0"
},

@@ -34,0 +34,0 @@ "scripts": {

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