This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { exec } from 'child_process'; | |
import { cp } from 'fs/promises'; | |
import { basename } from 'path'; | |
import { promisify } from 'util'; | |
const cwd = process.cwd(); | |
const execPromise = promisify(exec); | |
type PackageInfoType = { | |
value: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const FixedType = (()=>{ | |
"use-strict"; | |
/******************** | |
* basic variables * | |
*********************/ | |
const parentSymbol = Symbol("@@Parent"); | |
const TypeListSymbol = Symbol("@@TypeList"); | |
const TypeTable = class TypeTable extends Map{ | |
constructor(...args){ | |
super(...args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x0e81007942d6C65F71aF74fEC9Ad9F9bda2369C9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WeakEnumSymbol = Symbol("__Types"); | |
class WeakEnum{ | |
static symbol(){ | |
return WeakEnumSymbol; | |
} | |
static __primitiveToObj__(obj) { | |
if (obj instanceof Object) { | |
return obj; | |
} | |
else if(obj === undefined || obj === null || typeof obj === "symbol"){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = (function(){ | |
var Tree = function(obj){ | |
if (obj instanceof Object) { | |
//public variable | |
this.root = obj.root || this; | |
this.name = obj.name || ""; | |
this.childs = obj.childs || []; | |
this.left = obj.left || null; | |
this.right = obj.right || null; | |
this.parent = obj.parent || null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
function isListArr($array){ | |
if(is_array($array)){ | |
return array_values($array) === $array; | |
} | |
else{ | |
return false; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fn = {}; | |
fn.listPlugins = function(cb){ | |
if (!Array.isArray(this.plugins)) { | |
$.getJSON('/plugins/list.json',(json, textStatus) => { | |
if (textStatus == "success") { | |
this.plugins = json; | |
if (typeof cb == "function") { | |
cb(json); | |
} | |
else{ |