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

@astropub/assert

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

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
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

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

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