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

unplugin-utils

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-utils - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

package.json
{
"name": "unplugin-utils",
"version": "0.2.1",
"version": "0.2.2",
"description": "A set of utility functions commonly used by unplugins.",

@@ -49,3 +49,3 @@ "type": "module",

"engines": {
"node": ">=20.18.0"
"node": ">=18.12.0"
},

@@ -52,0 +52,0 @@ "prettier": "@sxzz/prettier-config",

@@ -9,2 +9,7 @@ # unplugin-utils [![npm](https://img.shields.io/npm/v/unplugin-utils.svg)](https://npmjs.com/package/unplugin-utils)

## Why Fork?
- 🌍 Platform agnostic, supports running in the browser, Node.js...
- ✂️ Subset, smaller bundle size.
## Install

@@ -16,2 +21,29 @@

## Usage
### createFilter
```ts
export default function myPlugin(options = {}) {
const filter = createFilter(options.include, options.exclude)
return {
transform(code, id) {
if (!filter(id)) return
// proceed with the transformation...
},
}
}
```
### normalizePath
```ts
import { normalizePath } from 'unplugin-utils'
normalizePath(String.raw`foo\bar`) // 'foo/bar'
normalizePath('foo/bar') // 'foo/bar'
```
## Sponsors

@@ -18,0 +50,0 @@

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