🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@astropub/assert

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astropub/assert

```sh npm install @astropub/assert ```

0.1.2
latest
73

Supply Chain Security

100

Vulnerability

84

Quality

76

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Version published
Maintainers
1
Created

Astro Import Assertions

npm install @astropub/assert
// astro.config.js
import { assertPlugin } from '@astropub/assert'

export default {
  vite: {
    plugins: [
      assertPlugin()
    ]
  }
}

Open in StackBlitz

Configuration

You can pass in special handlers for load and transform when imports with assertions are encountered.

import { assertions } from '@astropub/assert'

// astro.config.js
export default {
  vite: {
    plugins: [
      load(id, assert) {
        console.log(assert)
        // e.g. { type: "json" }
        // e.g. { type: "react-component", client: "load" }
      }
    ]
  }
}

`load(id, assertions, )

License

Codecs is a remix of Squoosh!.

Code original to this project is licensed under the CC0-1.0 License.

Code from Squoosh! is licensed under the Apache-2.0 License, Copyright Google Inc.

FAQs

Package last updated on 12 Jan 2022

Did you know?

Socket

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