@egjs/children-differ

中文文档
1.0.1发布于 2020/05/12MITTypeScriptESM + CJS近 30 天下载 337.8万

当添加、删除或更改儿童元素时检查 diff 的模块

中文使用文档
文档目录9 节
  1. @egjs/ 儿童差异
  2. * 安装
  3. 页:1
  4. • 软件包
  5. 使用方法
  6. 检查 diff
  7. 捐款
  8. * 反馈
  9. 许可证

@egjs/ 儿童差异

version Travis (.org) Coveralls github npm downloads per month GitHub

QQ 模块,用于检查 diff 当添加、去除或更改孩子元素时.

* 安装

$ npm i @egjs/children-differ
<script src="//naver.github.io/egjs-children-differ/release/latest/dist/children-differ.pkgd.min.js"></script>

页:1

• 软件包

软件包版本说明
@egjs/ react- children-differ (英语)versionReact 反应 @egjs/ children-differ 的端口
@egjs/ngx- 儿童- differversionAngular 角质 @egjs/ children-differ 的端口
@egjs/vue- children-differ (英语)versionVue.js Vue.js (英语) @egjs/ children-differ 的端口

使用方法

用法类似于 @ egjs/ list- divers。 。 。 .

检查 diff

<div id="container">
    <div>0</div>
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
</div>
<script>

import ChildrenDiffer from "@egjs/children-differ";

// Value is key
const differ = new ChildrenDiffer(conatiner.children);


container.removeChild(container.children[5]);
container.removeChild(container.children[2]);

const result = differ.update(container.children);
// [2, 5]
console.log(result.removed);
</script>

捐款

见 捐款额。 。 。 .

* 反馈

请存档 问题。 。 。 .

许可证

@egjs/list-differ 在下方发布 麻省理工学院许可证。 。 。 .

Copyright (c) 2019-present NAVER Corp.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

版本与发布记录

@egjs/children-differ 共发布 4 个版本,首次发布于 2019/05/13;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.1latest2020/05/126 年前
1.0.02019/08/057 年前
0.1.02019/07/317 年前
0.0.02019/05/137 年前

关于 @egjs/children-differ 的常见问题

@egjs/children-differ 是什么?

当添加、删除或更改儿童元素时检查 diff 的模块

如何安装 @egjs/children-differ?

在项目目录运行 npm install @egjs/children-differ,或使用 pnpm add / yarn add / bun add。

@egjs/children-differ 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@egjs/children-differ 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@egjs/children-differ 可以商用吗?

@egjs/children-differ 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@egjs/children-differ 的下载量有多少?

根据 npm 官方下载统计,@egjs/children-differ 在 2026/10/13 – 2026/11/11 这 30 天内被下载 3,378,254 次,日均约 112,608 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@egjs/children-differ 还在维护吗?

最新版本 1.0.1 发布于 2020/05/12(6 年前);至今共发布 4 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/05/13。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。