Socket
Socket
Sign inDemoInstall

svelte-preprocess-import-assets

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-preprocess-import-assets - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### Added
- Add `http` option
## 0.1.0 - 2021-05-01
Initial release

1

dist/index.d.ts

@@ -6,2 +6,3 @@ import { PreprocessorGroup } from 'svelte/types/compiler/preprocess';

importPrefix?: string;
http?: boolean;
urlFilter?: (url: string) => boolean;

@@ -8,0 +9,0 @@ }

@@ -8,2 +8,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/index.ts

importPrefix = DEFAULT_ASSET_PREFIX,
http = false,
urlFilter

@@ -21,2 +22,4 @@ } = options;

const url = attributeValue.raw.trim();
if (!http && /^https?:\/\//.test(url))
return;
if (urlFilter && !urlFilter(url))

@@ -23,0 +26,0 @@ return;

2

package.json
{
"name": "svelte-preprocess-import-assets",
"description": "Import assets in markup",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "author": "Bjorn Lu",

@@ -92,2 +92,9 @@ # svelte-preprocess-import-assets

### http
- **Type:** `boolean`
- **Default:** `false`
Whether a URL with http/https protocol should be converted to an import.
### urlFilter

@@ -94,0 +101,0 @@

Sorry, the diff of this file is not supported yet

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