
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
a pure javascript tool to generate html catelog by head (h1, h2, h3, h4, h5, h6);
类似于segmentfault和掘金的文章目录,无第三方依赖的,自动生成文章目录结构,灵活配置
npm i katelog -S
import katelog from 'katelog';
console.log(katelog);
<!-- 引入js文件 -->
<script src='./katelog.min.js'></script>
<!-- 文章容器 -->
<div id="kCatelog"></div>
<!-- 目录容器 -->
<div class="k-catelog-list" id="catelogList"></div>
new katelog({
contentEl: 'kCatelog',
catelogEl: 'catelogList',
linkClass: 'k-catelog-link',
linkActiveClass: 'k-catelog-link-active',
supplyTop: 20,
selector: ['h2', 'h3'],
active: function (el) {
console.log(el);
}
});
仅支持IE8以上和主流的浏览器
文章容器,id选择器
目录容器,id选择器
每个目录项的类
当前激活的目录项的类
选择目录的标题元素,默认支持6级树形结构
默认值: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']
selector: ['h2', 'h3']
每个目录需要补充的高度,比如fixed头部布局会挡住实现,可以设置supplyTop来修正
动态新增或者删除的内容,重新构建目录
let katelog = new katelog({ ... });
katelog.rebuild();
FAQs
a pure javascript tool to generate html catelog by head (h1, h2, h3, h4, h5, h6);
We found that katelog 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.