|
1 | 1 | "use strict"; |
| 2 | +var __createBinding = |
| 3 | + (this && this.__createBinding) || |
| 4 | + (Object.create |
| 5 | + ? function (o, m, k, k2) { |
| 6 | + if (k2 === undefined) k2 = k; |
| 7 | + var desc = Object.getOwnPropertyDescriptor(m, k); |
| 8 | + if ( |
| 9 | + !desc || |
| 10 | + ("get" in desc ? !m.__esModule : desc.writable || desc.configurable) |
| 11 | + ) { |
| 12 | + desc = { |
| 13 | + enumerable: true, |
| 14 | + get: function () { |
| 15 | + return m[k]; |
| 16 | + }, |
| 17 | + }; |
| 18 | + } |
| 19 | + Object.defineProperty(o, k2, desc); |
| 20 | + } |
| 21 | + : function (o, m, k, k2) { |
| 22 | + if (k2 === undefined) k2 = k; |
| 23 | + o[k2] = m[k]; |
| 24 | + }); |
| 25 | +var __setModuleDefault = |
| 26 | + (this && this.__setModuleDefault) || |
| 27 | + (Object.create |
| 28 | + ? function (o, v) { |
| 29 | + Object.defineProperty(o, "default", { enumerable: true, value: v }); |
| 30 | + } |
| 31 | + : function (o, v) { |
| 32 | + o["default"] = v; |
| 33 | + }); |
| 34 | +var __importStar = |
| 35 | + (this && this.__importStar) || |
| 36 | + function (mod) { |
| 37 | + if (mod && mod.__esModule) return mod; |
| 38 | + var result = {}; |
| 39 | + if (mod != null) |
| 40 | + for (var k in mod) |
| 41 | + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) |
| 42 | + __createBinding(result, mod, k); |
| 43 | + __setModuleDefault(result, mod); |
| 44 | + return result; |
| 45 | + }; |
2 | 46 | Object.defineProperty(exports, "__esModule", { value: true }); |
3 | 47 | exports.minifySync = exports.minify = void 0; |
4 | | -const binding = require("./binding"); |
| 48 | +const binding = __importStar(require("./binding")); |
5 | 49 | async function minify(content, options) { |
6 | | - return binding.minify(content, toBuffer(options)); |
| 50 | + return binding.minify( |
| 51 | + content, |
| 52 | + toBuffer(options !== null && options !== void 0 ? options : {}) |
| 53 | + ); |
7 | 54 | } |
8 | 55 | exports.minify = minify; |
9 | 56 | function minifySync(content, options) { |
10 | | - return binding.minifySync(content, toBuffer(options)); |
| 57 | + return binding.minifySync( |
| 58 | + content, |
| 59 | + toBuffer(options !== null && options !== void 0 ? options : {}) |
| 60 | + ); |
11 | 61 | } |
12 | 62 | exports.minifySync = minifySync; |
13 | 63 | function toBuffer(t) { |
|
0 commit comments