šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.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
Version published
Maintainers
1
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

assert

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