An FRP application has the following properties
- Functional, pure, immutable.
- Reactive, your application is a DAG, you react to "core" inputs and from new outputs.
If your application is an immutable DAG it has certain properties
/** | |
* Add dataset support to elements | |
* No globals, no overriding prototype with non-standard methods, | |
* handles CamelCase properly, attempts to use standard | |
* Object.defineProperty() (and Function bind()) methods, | |
* falls back to native implementation when existing | |
* Inspired by http://code.eligrey.com/html5/dataset/ | |
* (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js ) | |
* Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below) | |
* All code below is Licensed under the X11/MIT License |
# ========================================================== | |
# NPM | |
# ========================================================== | |
npm set registry https://registry.npmmirror.com # 注册模块镜像 | |
npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像 |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
./** | |
* Helper for iterating through the nodes in a document that changed compared | |
* to the given previous document. Useful for avoiding duplicate work on each transaction. | |
* Source: https://github.com/ProseMirror/prosemirror-tables/blob/master/src/fixtables.js | |
*/ | |
import type { Node as PMNode } from "prosemirror-model" | |
export function changedDescendants(old: PMNode, cur: PMNode, offset: number, f: (node: PMNode, pos: number) => void) { | |
let oldSize = old.childCount, curSize = cur.childCount | |
outer: for (let i = 0, j = 0; i < curSize; i++) { |