Socket
Socket
Sign inDemoInstall

extract-style

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    extract-style

Extract stlye.


Version published
Maintainers
1
Install size
174 kB
Created

Readme

Source

Introduction

Extract stlye.

Start

npm install -g extract-style

Example

<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div style="width: 100px; height: 100px; background-color: red"></div>
</body>
</html>

run

extract-style -i ./index.html -o ./target

result

<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
	<link rel="stylesheet" href="./index.css">
</head>
<body>
  <div class="LvSrfUQYSuDYoMKBgHfJuZJVhlPgTLyK"></div>
</body>
</html>
/* index.css */
.LvSrfUQYSuDYoMKBgHfJuZJVhlPgTLyK {width:100px;height:100px;background-color:red}

Keywords

FAQs

Last updated on 07 Mar 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc