Comparing version 0.0.14 to 0.0.15
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.minifySync = exports.minify = void 0; | ||
const binding = require("./binding"); | ||
const binding = __importStar(require("./binding")); | ||
async function minify(content, options) { | ||
return binding.minify(content, toBuffer(options)); | ||
return binding.minify(content, toBuffer(options !== null && options !== void 0 ? options : {})); | ||
} | ||
exports.minify = minify; | ||
function minifySync(content, options) { | ||
return binding.minifySync(content, toBuffer(options)); | ||
return binding.minifySync(content, toBuffer(options !== null && options !== void 0 ? options : {})); | ||
} | ||
@@ -12,0 +35,0 @@ exports.minifySync = minifySync; |
@@ -1,9 +0,9 @@ | ||
import binding = require("./binding"); | ||
import * as binding from "./binding"; | ||
export async function minify(content: Buffer, options: any): Promise<string> { | ||
return binding.minify(content, toBuffer(options)); | ||
export async function minify(content: Buffer, options?: any): Promise<string> { | ||
return binding.minify(content, toBuffer(options ?? {})); | ||
} | ||
export function minifySync(content: Buffer, options: any) { | ||
return binding.minifySync(content, toBuffer(options)); | ||
export function minifySync(content: Buffer, options?: any) { | ||
return binding.minifySync(content, toBuffer(options ?? {})); | ||
} | ||
@@ -10,0 +10,0 @@ |
{ | ||
"name": "@swc/html", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Super-fast alternative for posthtml", | ||
@@ -57,16 +57,16 @@ "homepage": "https://swc.rs", | ||
"optionalDependencies": { | ||
"@swc/html-win32-x64-msvc": "0.0.14", | ||
"@swc/html-darwin-x64": "0.0.14", | ||
"@swc/html-linux-x64-gnu": "0.0.14", | ||
"@swc/html-linux-x64-musl": "0.0.14", | ||
"@swc/html-freebsd-x64": "0.0.14", | ||
"@swc/html-win32-ia32-msvc": "0.0.14", | ||
"@swc/html-linux-arm64-gnu": "0.0.14", | ||
"@swc/html-linux-arm-gnueabihf": "0.0.14", | ||
"@swc/html-darwin-arm64": "0.0.14", | ||
"@swc/html-android-arm64": "0.0.14", | ||
"@swc/html-linux-arm64-musl": "0.0.14", | ||
"@swc/html-win32-arm64-msvc": "0.0.14", | ||
"@swc/html-android-arm-eabi": "0.0.14" | ||
"@swc/html-win32-x64-msvc": "0.0.15", | ||
"@swc/html-darwin-x64": "0.0.15", | ||
"@swc/html-linux-x64-gnu": "0.0.15", | ||
"@swc/html-linux-x64-musl": "0.0.15", | ||
"@swc/html-freebsd-x64": "0.0.15", | ||
"@swc/html-win32-ia32-msvc": "0.0.15", | ||
"@swc/html-linux-arm64-gnu": "0.0.15", | ||
"@swc/html-linux-arm-gnueabihf": "0.0.15", | ||
"@swc/html-darwin-arm64": "0.0.15", | ||
"@swc/html-android-arm64": "0.0.15", | ||
"@swc/html-linux-arm64-musl": "0.0.15", | ||
"@swc/html-win32-arm64-msvc": "0.0.15", | ||
"@swc/html-android-arm-eabi": "0.0.15" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11483
296