Skip to content

Instantly share code, notes, and snippets.

View lisonge's full-sized avatar
🐳
❀💧

二刺螈 lisonge

🐳
❀💧
View GitHub Profile
(function(global2, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("jszip/dist/jszip")) : typeof define === "function" && define.amd ? define(["exports", "jszip/dist/jszip"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.ePub = {}, global2.JSZip));
})(this, function(exports2, JSZip) {
"use strict";
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
var eventEmitter = { exports: {} };
var d$1 = { exports: {} };
@lisonge
lisonge / test.ts
Created February 11, 2023 13:27
replace specified node in json
import MagicString from 'magic-string';
import * as acorn from 'acorn';
const prefix = `const x=`;
const code = `${prefix}{
"pages": ["pages/index/index"],
"subpackages": [
{
"name": "A",
"pages": ["innerModule/pages/index/index"]