This file contains hidden or 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
// 判断两数正负号相反 | |
function oppositeSign(x, y) { | |
return x ^ y < 0 | |
} |
This file contains hidden or 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
# https://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
insert_final_newline = true |
This file contains hidden or 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 path = require("path"); | |
const glob = require("glob"); | |
const types = require("conventional-commit-types").types; | |
const longest = Math.max(...Object.keys(types).map((type) => [...type].length)); | |
function getPackages(ctx) { | |
const cwd = ctx ? ctx.cwd : process.cwd(); | |
const packageJson = require(path.join(cwd, "package.json")); | |
if (packageJson && Array.isArray(packageJson.workspaces)) { |