整理的 v2 代码片段
每个代码片段新建一个 markdown 文件
/** | |
* Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2. | |
* Original file: /npm/js-yaml@4.1.0/dist/js-yaml.mjs | |
* | |
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files | |
*/ | |
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ | |
function e(e){return null==e}var t={isNothing:e,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(t){return Array.isArray(t)?t:e(t)?[]:[t]},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,r,o;if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r];return e}};function n(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function i(e,t){Error.call(this),this.name="YAMLException",this.reason=e, |
const handleApprovalStateBtnDisplay = () => { | |
const currentState = document.querySelector( | |
"[data-name='Tabledf1a31a81'] tbody > tr:nth-child(2) > td:nth-child(1)", | |
).innerText; | |
if (currentState === '未提交') { | |
document | |
.querySelector( | |
"[data-name='Tabledf1a31a81'] tbody > tr:nth-child(2) > td:last-child div > button:nth-child(3)", | |
) |
const path = require('path'); | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const { v4: uuidv4 } = require('uuid'); | |
const rootPath = path.resolve(__dirname, '../'); | |
const tplDirPath = path.join(rootPath, 'lib'); | |
const fileDisplay = (targetRootPath) => { | |
const fileArr = []; |