
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@142vip/copyright
Advanced tools
软著工具包,用于申请软件著作权的前后30页连续源代码文档。
# 安装
pnpm i @142vip/copyright
import { VipCopyright } from '@142vip/copyright'
// 静态方法
await VipCopyright.quickGenerateDocx({
copyrightTitle: 'AI大模型平台',
copyrightVersion: 'V1.0',
sourceCodeDir: './',
fileType: 'ts',
})
import { VipCopyright } from '@142vip/copyright'
// 实例化,创建对象
const vipCopyright = new VipCopyright(copyrightTitle, copyrightVersion, {
// 是否需要终端打印日志,默认false
logger: true,
})
// 生成源代码文档
await vipCopyright.generateDocx('./', 'ts')
/**
* 软著支持的源代码文件类型
*/
export enum CopyrightFileType {
JAVA = 'java',
JAVASCRIPT = 'js',
TYPESCRIPT = 'ts',
PYTHON = 'py',
C = 'c',
CPP = 'cpp',
GO = 'go',
SWIFT = 'swift',
PHP = 'php',
RUST = 'rs',
SHELL = 'sh',
SQL = 'sql',
YAML = 'yaml',
YML = 'yml',
JSON = 'json',
XML = 'xml',
HTML = 'html',
TEXT = 'txt',
}
VipCopyright类
copyrightTitle: 版权标题copyrightVersion: 版权版本options: 选项quickGenerateDocx: 快速生成源代码文档
options: 选项generateDocx: 生成源代码文档
sourceCodeDir: 源代码目录fileType: 文件类型options: 选项saveCodeToDocx: 保存源代码到文档
sourceCode: 源代码filePath: 文件路径fileType: 文件类型options: 选项scanSourceCode: 扫描源代码
sourceCodeDir: 源代码目录fileType: 文件类型options: 选项/**
* 版权对象实例化参数
* - 可选
*/
export interface CopyrightOptions {
/**
* 每页最大行数
*/
maxLineCountInPage?: number
/**
* 扫描的最大代码行数
*/
maxScanSourceLineCount?: number
/**
* 是否开启控制台日志
*/
logger?: boolean
}
isSourceCodeLine: 判断是否为源代码行readSourceCodeLinesByFile: 读取源代码getSourceCodeFiles: 获取源代码文件getPageSectionInDocx: 获取文档页模板Copyright (c) 2019-present, 142vip 储凡
FAQs
We found that @142vip/copyright demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.