New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

css-to-ts

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-to-ts - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

6

dist/css-to-ts.js

@@ -5,2 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });

function ConvertCssToTs(stringifiedCss, variableName, headerComment, varType = contracts_1.VarType.Const) {
const newLineSplitterLength = os_1.EOL.length;
const newLineLastAppearance = stringifiedCss.lastIndexOf(os_1.EOL);
const endsWithNewLine = (newLineLastAppearance + newLineSplitterLength) === stringifiedCss.length;
const cssContent = endsWithNewLine ? stringifiedCss.slice(0, newLineLastAppearance) : stringifiedCss;
let content = "";

@@ -10,5 +14,5 @@ if (headerComment) {

}
content += `export ${varType} ${variableName} = \`${stringifiedCss}\`;${os_1.EOL}`;
content += `export ${varType} ${variableName}: string = \`${cssContent}\`;${os_1.EOL}`;
return content;
}
exports.ConvertCssToTs = ConvertCssToTs;

2

package.json
{
"name": "css-to-ts",
"version": "1.0.0",
"version": "1.0.1",
"description": "css-to-ts takes a css file and outputs a TypeScript file with an exported string containing a content of your css file.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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