update eaf package

This commit is contained in:
2021-01-30 14:52:51 +01:00
parent 84eb4929ee
commit 5207af83cb
4981 changed files with 11795 additions and 761570 deletions

View File

@@ -0,0 +1,6 @@
*.gif filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
core/aria2-ng/index.html linguist-vendored
core/js/dark_mode.js linguist-vendored
core/js/caret_browsing.js linguist-vendored
app/mindmap/*.js linguist-vendored

View File

@@ -0,0 +1,28 @@
---
name: EAF Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Ensure you're on the latest master branch, then note the steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Versions (please complete the following info):**
- Distro and DE/WM:
- Versions of Dependencies:
- M-x emacs-version:
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: EAF Feature request
about: Suggest an idea for the Emacs Application Framework
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of an alternative solutions or features you've considered, if any.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "npm" # See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem
directory: "/" # Location of package manifests
schedule:
interval: "daily"

8
lisp/emacs-application-framework/.gitignore vendored Executable file
View File

@@ -0,0 +1,8 @@
*.elc
*.pyc
/.log/
/app/js-video-player/node_modules/
/app/mermaid/node_modules/
/app/terminal/node_modules/
/app/image-viewer/node_modules/
/app/markdown-previewer/node_modules/

View File

@@ -6,7 +6,7 @@ EAF is a GUI application framework that revolutionizes Emacs graphical capabilit
## EAF Application Overview
EAF is an extensible framework, one can develop any Qt5 application and integrate it into Emacs.
| Browser | Markdown Previewer |
| Browser | Markdown Previewer (support Mermaid and PlantUML) |
| :--------: | :----: |
| <img src="./screenshot/browser.gif" width="400"> | <img src="./screenshot/markdown_previewer.gif" width="400"> |
@@ -31,7 +31,7 @@ EAF is an extensible framework, one can develop any Qt5 application and integrat
| <img src="./screenshot/air_share.png" width="400"> | <img src="./screenshot/org_previewer.gif" width="400"> |
| | |
| Terminal Emulator | RSS Reader |
| Terminal Emulator | RSS Reader (Integrated with Elfeed) |
| :--------: | :------: |
| <img src="./screenshot/terminal.gif" width="400"> | <img src="./screenshot/rss_reader.gif" width="400"> |
| | |
@@ -42,92 +42,101 @@ EAF is an extensible framework, one can develop any Qt5 application and integrat
| | |
| Mermaid | EAF Interleave |
| Jupyter | EAF Interleave |
| :--------: | :----------: |
| <img src="./screenshot/mermaid.gif" width="400"> | <img src="./screenshot/eaf-interleave.gif" width="400"> |
| <img src="./screenshot/jupyter.png" width="400"> | <img src="./screenshot/eaf-interleave.gif" width="400"> |
| | |
## EmacsConf2020 - Extend Emacs to Modern GUI Applications with EAF
- EAF talk & demo at EmacsConf2020, presented to you by [MatthewZMD](https://github.com/MatthewZMD)
- Homepage (Q&A included): https://emacsconf.org/2020/talks/34/
- Youtube link:
[![EmacsConf2020 - Extend Emacs to Modern GUI Applications with EAF](https://img.youtube.com/vi/HK_f8KTuR0s/0.jpg)](https://www.youtube.com/watch?v=HK_f8KTuR0s)
## Install
1. Install EAF dependencies, an explaination of each dependency can be found in [Dependency List](#dependency-list).
The following line is for *Archlinux*, same packages should be available to install on your particular distribution:
1. Download EAF
```Bash
yay -S python-pyqt5 python-pyqt5-sip python-pyqtwebengine python-qrcode python-feedparser python-dbus python-pyinotify python-markdown nodejs aria2 libreoffice python-pymupdf python-grip filebrowser-bin
git clone --depth=1 -b master https://github.com/manateelazycat/emacs-application-framework.git ~/.emacs.d/site-lisp/emacs-application-framework/
```
2. Clone this repository.
```Bash
git clone https://github.com/manateelazycat/emacs-application-framework.git --depth=1
Alternatively, you can use a [Quelpa recipe](https://github.com/quelpa/quelpa)
```Emacs-lisp
(quelpa '(eaf (:fetcher github
:repo "manateelazycat/emacs-application-framework"
:files ("*"))))
```
3. Add the full path to the EAF installation directory to your Emacs ```load-path```, then add the following to `init.el`:
2. Install EAF dependencies using `M-x install-eaf-dependencies`.
If you prefer to manually call the installation script in the terminal,
- If you use GNU/Linux,
```Bash
cd emacs-application-framework
chmod +x ./install-eaf.sh
./install-eaf.sh
```
- If you use Windows,
```shell
cd emacs-application-framework
node ./install-eaf-win32.js
```
Feel free to inspect the install script yourself. An explanation of each dependency can be found at [Dependency List](#dependency-list).
3. Install Elisp packages:
- [emacs-ctable](https://github.com/kiwanami/emacs-ctable)
- [emacs-deferred](https://github.com/kiwanami/emacs-deferred)
- [emacs-epc](https://github.com/kiwanami/emacs-epc)
- [s.el](https://github.com/magnars/s.el)
4. From here on, you can either add the full path to the EAF installation directory to your Emacs ```load-path```, then add the following to `init.el`:
```Elisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(require 'eaf)
```
If you use [use-package](https://github.com/jwiegley/use-package), a sample configuration has been provided.
or, if you use [use-package](https://github.com/jwiegley/use-package), you can use the following *sample* configuration for your convenience.
```Elisp
(use-package eaf
:load-path "~/.emacs.d/site-lisp/emacs-application-framework" ; Set to "/usr/share/emacs/site-lisp/eaf" if installed from AUR
:init
(use-package epc :defer t)
(use-package ctable :defer t)
(use-package deferred :defer t)
(use-package s :defer t :ensure t)
:custom
(eaf-find-alternate-file-in-dired t)
(eaf-browser-continue-where-left-off t)
:config
(eaf-setq eaf-browser-enable-adblocker "true")
(eaf-bind-key scroll_up "C-n" eaf-pdf-viewer-keybinding)
(eaf-bind-key scroll_down "C-p" eaf-pdf-viewer-keybinding)
(eaf-bind-key take_photo "p" eaf-camera-keybinding))
(eaf-bind-key take_photo "p" eaf-camera-keybinding)
(eaf-bind-key nil "M-q" eaf-browser-keybinding)) ;; unbind, see more in the Wiki
```
---
If you use [Chemacs](https://github.com/plexus/chemacs), a sample `init.el` is provided as follows:
```Elisp
;; An example of init.el
(defun add-subdirs-to-load-path (dir)
"Recursive add directories to `load-path'."
(let ((default-directory (file-name-as-directory dir)))
(add-to-list 'load-path dir)
(normal-top-level-add-subdirs-to-load-path)))
(add-subdirs-to-load-path "~/.emacs.d/")
(require 'eaf)
```
During EAF installation, you only need to modify the parameter value when calling function `add-subdirs-to-load-path`, change it into your full path to the EAF installation directory. The sample gives a situation when you install EAF at `~/.emacs.d/`.
After EAF installation, let's assume your EAF installation directory is `~/eaf`, you only have Emacs configurations at `~/.emacs.d` and EAF installed on your computer, and you have installed Chemacs, then the `.emacs-profiles.el` should look like this:
```Elisp
(("default" . ((user-emacs-directory . "~/.emacs.d")))
("EAF" . ((user-emacs-directory . "~/eaf"))))
```
When you want to use EAF by chemacs, you can excute `emacs --with-profile EAF` in the terminal.
### Dependency List
Packages listed as **Core** are mandatory for EAF to work, whereas other packages are optional - install if you want to use corresponding EAF Application.
| Package | Dependent | Description |
| :-------- | :------ | :------ |
| python-pyqt5, python-pyqt5-sip | Core | Essential GUI library |
| python-dbus | Core | DBus IPC to connect Python with Elisp |
| python-pyqtwebengine | Core | Chromium based web rendering engine |
| wmctrl | Core | Activate Emacs window input focus |
| python-pymupdf | PDF Viewer | PDF rendering engine |
| python-grip | Markdown Previewer | Markdown rendering server |
| python-qrcode | File Sender, File Receiver, Airshare | Render QR code pointing to local files |
| python-feedparser | RSS Reader | Parse RSS feeds |
| python-pyinotify | Mermaid | Monitor *.mmd file change status |
| python-markdown | Mermaid | Covert markdown format to mermaid html format |
| nodejs | Terminal | Communicate between browser and local TTY |
| aria2 | Browser | Download files from the web |
| libreoffice | Doc Viewer | Convert doc file to pdf |
| filebrowser-bin | File Browser | Share files between computer and smartphone |
| qtconsole | Jupyter | Provide RichJupyterWidget |
| java-openjdk | Markdown Previewer | Make mume.js can render PlantUML content |
## Launch EAF Applications
| Application Name | Launch |
@@ -145,62 +154,59 @@ Packages listed as **Core** are mandatory for EAF to work, whereas other package
| File Sender | `M-x eaf-file-sender-qrcode` or `eaf-file-sender-qrcode-in-dired` |
| File Browser | `M-x eaf-file-browser-qrcode` |
| Airshare | `M-x eaf-open-airshare` |
| RSS Reader | `M-x eaf-open-rss-reader` |
| Mindmap | `M-x eaf-create-mindmap` or `M-x eaf-open-mindmap` |
| MS Office Viewer | `M-x eaf-open-office` |
| Mermaid | `M-x eaf-open` Mermaid file (*.mmd) |
| Jupyter | `M-x eaf-open-jupyter` |
| Demo | `M-x eaf-open-demo` to verify basic functionality |
- To open the file under the cursor in `dired` using appropriate EAF Application, use `eaf-open-this-from-dired` instead.
- EAF Browser and PDF Viewer support Emacs built-in bookmark operation, with `M-x bookmark-set` (defaulted to `C-x r m`) and `M-x bookmark-bmenu-list` (defaulted to `C-x r l`).
```
NOTE:
EAF use DBus' session bus, it must run by a general user.
Please don't use EAF when Emacs is started with sudo or root user, a root user can only access DBus's system bus.
```
## Wiki
It is **highly** suggested to read the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) first before using EAF.
Wiki consists of documentations on Keybinding, Customization, Design and TODOLIST. There also are some helpful tips to make EAF work with Docker, Helm, etc.
Wiki consists of documentations on:
* Keybindings
* Customization
* Design
* TODOLIST
There also are some helpful tips to make EAF work with Docker, Helm, etc.
## FAQ
### How does EAF work?
EAF implements three major functionalities:
1. Integrate PyQt program window into Emacs frame using QWindow Reparent technology.
2. Listen to EAF buffer's keyboard event flow and control the keyboard input of PyQt program via DBus IPC.
2. Listen to EAF buffer's keyboard event flow and control the keyboard input of PyQt program via Python EPC.
3. Create a window compositer to make a PyQt program window adapt Emacs's Window/Buffer design.
Learn more from the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki/Hacking)!
### EAF vs EXWM?
1. EAF and EXWM share a common goal: enhance collaboration between the standard GNU Emacs with other GUI tools.
2. EXWM is an X11 Window Manager, it manages and controls other software using a keyboard, but it cannot modify, customize and extend the behavior of other software. For example, it cannot modify the behavior when you press a key in Chrome or a PDF viewer.
2. EXWM is an X11 Window Manager, it manages and controls other software using a keyboard, but it cannot modify, customize and extend the behavior of other software.
3. EAF is *not* a Window Manager, it utilizes the windows managing capabilities of Emacs to display its applications.
4. The intention of EAF is to provide a framework to write PyQt5 applications that extends the multimedia experience of Emacs. From the perspective of Emacs' buffer/mode design, EAF is not different from any other package, with the former uses Qt for drawing contents while the latter uses Emacs' built-in text libraries instead.
5. Through EAF's design, one can use Elisp to control Python and vice versa, and even able to use Elisp to control JavaScript in EAF Browser. EAF enables Emacs to the world of **multi-language scripting**.
Both projects are similar in terms of interface, but they are two completely different projects with different goals in mind. Sometimes one may find EAF is more suitable than EXWM, sometimes it's the other way around. Please do not meaninglessly compare them.
### EAF is (currently) Linux only. Why?
1. DBus is Linux-specific technology, it's difficult to support DBus in other operating systems.
2. Qt5's QGraphicsScene technology does not work on MacOS.
### EAF can't works on MacOS. Why?
1. Qt5's QGraphicsScene technology does not work on MacOS.
2. QWindow Reparent technology need use the original API of Mac platform for replacement.
If you've figure them out, PRs are always welcome!
### `[EAF] *eaf* aborted (core dumped)` error
Please check the `*eaf*` buffer, something is wrong on the Python side. Usually due to Python dependencies are not installed correctly.
### EAF js-video-player can't play some video on Windows. Why?
`js-video-player` requires that qtwebengine built against ffmpeg to support proprietary codecs like `h264/aac`.
If you're sure Python dependences are installed correctly, please create an issue with the `*eaf*` buffer content, it contains many clues that can help us locate the problem faster.
### Why doesn't EAF receive input events on WM?
EAF confirms that the desktop environment or window manager you can work includes: KDE, GNOME2, GNOME3, Mate, Xfce, LXDE, I3, QTILE, Xpra.
### What is Github Personal Access Tokens?
If you use EAF Markdown Previewer, to get consistent previewing, you need to access [Github Personal access token site](https://github.com/settings/tokens/new?scopes=), fill something in "Token description" and click button "Generate token" to get your personal token. Then set the token:
We suspect there are some issues with how all the Window Managers implement their x11 protocols.
```Elisp
(setq eaf-grip-token "yourtokencode")
```
Although Markdown Previewer works for the first few times by entering empty string when prompted, eventually it stops working and gives "GitHub Rate Limit Reached" error.
One workaround is to name of command `wmctrl -m` to the elisp list `eaf-wm-focus-fix-wms`. Fill an issue if it still doesn't work.
### Proxy
If you need to use proxy to access internet, one can configure the proxy settings.
@@ -227,11 +233,13 @@ If we missed your package, please make a PR to add it to the list.
## Report bug
For any installation and configuration assistance, please read the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) first!
### For any installation and configuration assistance, please read the [Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki) first!
If you encounter any problem with EAF, please use command `emacs -q` with a minimal setup that only contains EAF and verify the bug is reproducible. If `emacs -q` works fine, probably something is wrong with your Emacs config.
If you encounter a problem with EAF, and it occured after pulling the latest commit, please check the [Discussions](https://github.com/manateelazycat/emacs-application-framework/discussions/527) page first.
If the problem persists, please [report bug here](https://github.com/manateelazycat/emacs-application-framework/issues/new).
For any other problems, please use `emacs -q` and load a minimal setup with only EAF to verify that the bug is reproducible. If `emacs -q` works fine, probably something is wrong with your Emacs config.
If the problem persists, please report it [here](https://github.com/manateelazycat/emacs-application-framework/issues/new) with `*eaf*` buffer content, it contains many clues that can help us locate the problem faster.
If you got segfault error, please use the following way to collect crash information:
1. Install gdb and turn on option `eaf-enable-debug`

View File

@@ -6,7 +6,7 @@ EAF 是一个全新的图形应用框架通过扩展Emacs的多媒体能力
## EAF 应用展示
EAF是一个可编程扩展的框架你可以开发自己的Qt5应用并集成在Emacs中。
| 浏览器 | Markdown预览程序 |
| 浏览器 | Markdown预览(支持Mermaid和PlantUML) |
| :--------: | :----: |
| <img src="./screenshot/browser.gif" width="400"> | <img src="./screenshot/markdown_previewer.gif" width="400"> |
@@ -31,7 +31,7 @@ EAF是一个可编程扩展的框架你可以开发自己的Qt5应用并集
| <img src="./screenshot/air_share.png" width="400"> | <img src="./screenshot/org_previewer.gif" width="400"> |
| | |
| 终端模拟器 | RSS阅读器 |
| 终端模拟器 | RSS阅读器 (集成Elfeed) |
| :--------: | :------: |
| <img src="./screenshot/terminal.gif" width="400"> | <img src="./screenshot/rss_reader.gif" width="400"> |
| | |
@@ -41,92 +41,102 @@ EAF是一个可编程扩展的框架你可以开发自己的Qt5应用并集
| <img src="./screenshot/aria2.gif" width="400"> | <img src="./screenshot/mindmap.gif" width="400"> |
| | |
| 流程图 | 笔记管理系统 |
| Jupyter | 笔记管理系统 |
| :--------: | :--------: |
| <img src="./screenshot/mermaid.gif" width="400"> | <img src="./screenshot/eaf-interleave.gif" width="400"> |
| <img src="./screenshot/jupyter.png" width="400"> | <img src="./screenshot/eaf-interleave.gif" width="400"> |
| | |
## EmacsConf2020 - Extend Emacs to Modern GUI Applications with EAF暂无中文字幕
- 由[MatthewZMD](https://github.com/MatthewZMD)在EmacsConf2020的演讲和demo。
- 官网内附Q&A: https://emacsconf.org/2020/talks/34/
- Youtube链接:
[![EmacsConf2020 - Extend Emacs to Modern GUI Applications with EAF](https://img.youtube.com/vi/HK_f8KTuR0s/0.jpg)](https://www.youtube.com/watch?v=HK_f8KTuR0s)
## 安装
1. 安装EAF依赖,对于每个依赖的解释可以在[依赖列表](#依赖列表)找到。
以下这行是针对*Archlinux*,同样的包的安装方式在别的发行版略有不同,请善用搜索引擎:
1. 下载EAF:
```Bash
yay -S python-pyqt5 python-pyqt5-sip python-pyqtwebengine python-qrcode python-feedparser python-dbus python-pyinotify python-markdown nodejs aria2 libreoffice python-pymupdf python-grip filebrowser-bin
git clone --depth=1 -b master https://github.com/manateelazycat/emacs-application-framework.git ~/.emacs.d/site-lisp/emacs-application-framework/
```
2. 使用 ```git clone``` 下载这个仓库.
```Bash
git clone https://github.com/manateelazycat/emacs-application-framework.git --depth=1
你也可以通过[Quelpa](https://github.com/quelpa/quelpa)来下载
```Emacs-lisp
(quelpa '(eaf (:fetcher github
:repo "manateelazycat/emacs-application-framework"
:files ("*"))))
```
3. 把EAF加入Emacs的 ```load-path```,然后在 `init.el` 中写入:
2. 通过`M-x install-eaf-dependencies`安装EAF依赖
如果你更喜欢手动执行安装脚本,
- GNU/Linux用户
```Bash
cd emacs-application-framework
chmod +x ./install-eaf.sh
./install-eaf.sh
```
- Windows用户
```shell
>>>>>>> Update README and eaf-install-dependencies (need Windows testing)
cd emacs-application-framework
node ./install-eaf-win32.js
```
脚本里安装的每一个依赖的解释可以在[依赖列表](#依赖列表)找到。
3. 安装Elisp依赖包:
- [emacs-ctable](https://github.com/kiwanami/emacs-ctable)
- [emacs-deferred](https://github.com/kiwanami/emacs-deferred)
- [emacs-epc](https://github.com/kiwanami/emacs-epc)
- [s.el](https://github.com/magnars/s.el)
4. 从这里开始你可以把EAF加入Emacs的 ```load-path```,然后在 `init.el` 中写入:
```Elisp
(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(require 'eaf)
```
如果你使用[use-package](https://github.com/jwiegley/use-package),下面有一个简单的配置文件供你参考:
或者,如果你使用[use-package](https://github.com/jwiegley/use-package),下面有一个简单的配置文件供你参考:
```Elisp
(use-package eaf
:load-path "~/.emacs.d/site-lisp/emacs-application-framework" ; Set to "/usr/share/emacs/site-lisp/eaf" if installed from AUR
:init
(use-package epc :defer t)
(use-package ctable :defer t)
(use-package deferred :defer t)
(use-package s :defer t :ensure t)
:custom
(eaf-find-alternate-file-in-dired t)
(eaf-browser-continue-where-left-off t)
:config
(eaf-setq eaf-browser-enable-adblocker "true")
(eaf-bind-key scroll_up "C-n" eaf-pdf-viewer-keybinding)
(eaf-bind-key scroll_down "C-p" eaf-pdf-viewer-keybinding)
(eaf-bind-key take_photo "p" eaf-camera-keybinding))
(eaf-bind-key take_photo "p" eaf-camera-keybinding)
(eaf-bind-key nil "M-q" eaf-browser-keybinding)) ;; unbind, see more in the Wiki
```
---
如果你使用[Chemacs](https://github.com/plexus/chemacs) 下面是一份 `init.el`的配置示例:
```Elisp
;; An example of init.el
(defun add-subdirs-to-load-path (dir)
"Recursive add directories to `load-path'."
(let ((default-directory (file-name-as-directory dir)))
(add-to-list 'load-path dir)
(normal-top-level-add-subdirs-to-load-path)))
(add-subdirs-to-load-path "~/.emacs.d/")
(require 'eaf)
```
在安装EAF时你仅需要修改此文件中调用函数`add-subdirs-to-load-path`的参数值将其更改为你的EAF安装位置的绝对路径。 配置示例中的EAF是安装在`~/.emacs.d/`.
在EAF安装完成后假设你将它安装到了`~/eaf`,你电脑中只有存放在`~/.emacs.d`的Emacs配置文件和安装的EAF并且你电脑中安装了Chemacs此时`.emacs-profiles.el`应该这样配置:
```Elisp
(("default" . ((user-emacs-directory . "~/.emacs.d")))
("EAF" . ((user-emacs-directory . "~/eaf"))))
```
当你想使用Chemacs打开EAF只需在终端中执行`emacs --with-profile EAF`
### 依赖列表
**核心** 分类代表必备依赖这些包必须安装好EAF才能工作。其余依赖都可选若想其使用对应的应用时你才需要安装这些依赖。当然我们推荐先把所有依赖都安装好等到真正使用的时候就不用再次折腾。
| 包名 | 依赖 | 解释 |
| :-------- | :------ | :------ |
| python-pyqt5, python-pyqt5-sip | 核心 | GUI图形库 |
| python-dbus | 核心 | DBus库用于在Emacs和Python进程间通讯 |
| python-pyqtwebengine | 核心 | 基于Chromium的浏览器引擎 |
| wmctrl | 核心 | 激活Emacs窗口输入焦点 |
| python-pymupdf | PDF阅读器 | 解析PDF文件 |
| python-grip | Markdown预览 | 建立Markdown文件的HTML服务 |
| python-qrcode | 文件上传,文件下载,文字传输 | 根据文件信息生成二维码 |
| python-feedparser | RSS阅读器 | 解析RSS/Atom信息 |
| python-pyinotify | 流程图 | 监听 mmd 格式文件的变动 |
| python-markdown | 流程图 | 转换 mmd 格式为 mermaid 识别的 html 格式 |
| aria2 | 浏览器 | 下载网络文件 |
| nodejs | 终端模拟器 | 通过浏览器与本地TTY交互 |
| libreoffice | 办公文档阅读器 | 转换doc文件为pdf格式 |
| filebrowser-bin | 文件浏览器 | 在电脑和手机之间快速共享文件 |
| qtconsole | jupyter | 提供RichJupyterWidget |
| java-openjdk | Markdown 预览 | 正常渲染Markdown文档中的PlantUML代码 |
## EAF应用启动命令
| 应用名称 | 启动命令 |
@@ -144,36 +154,37 @@ git clone https://github.com/manateelazycat/emacs-application-framework.git --de
| 二维码下载文件 | `M-x eaf-file-sender-qrcode` or `eaf-file-sender-qrcode-in-dired` |
| 二维码在线浏览器 | `M-x eaf-file-browser-qrcode` |
| 无线分享 | `M-x eaf-open-airshare` 输入要分享给手机的字符串 |
| RSS新闻阅读器 | `M-x eaf-open-rss-reader` |
| 思维导图 | `M-x eaf-create-mindmap` or `M-x eaf-open-mindmap` |
| 微软Office阅读器 | `M-x eaf-open-office` |
| 流程图 | `M-x eaf-open` 输入 mmd 格式文件 |
| jupyter | `M-x eaf-open-jupyter` |
| 演示程序 | `M-x eaf-open-demo` |
-`dired`文件管理器中,建议绑定按键到命令 `eaf-open-this-from-dired` 它会自动用合适的EAF应用来打开文件。
- EAF浏览器以及PDF浏览器支持Emacs内置书签操作通过使用`M-x bookmark-set`(默认`C-x r m`)以及`M-x bookmark-bmenu-list`(默认`C-x r l`)。
```
注意:
EAF使用DBus的普通权限总线 (session bus),请不要用 sudo 来启动EAFroot用户只能访问系统权限总线 (system bus)
```
## Wiki
强烈建议使用EAF之前浏览一遍[Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki)。
Wiki包括架构设计按键绑定自定义选项和任务列表等文档。你还会在Wiki发现很多有用的技巧比如DockerHelm等
Wiki囊括了各种你想了解的EAF相关文档包括了
1. 按键绑定
2. 自定义选项
3. 架构设计
4. 任务列表
你还会在Wiki发现很多有用的技巧如DockerHelm等
## 常用问题
### EAF是怎么工作的
EAF主要实现这几个功能
1. 利用QWindow的Reparent技术来实现PyQt应用进程的窗口粘贴到Emacs对应的Buffer区域
2. 通过DBus IPC来实现Emacs进程和Python进程的控制指令和跨进程消息通讯
2. 通过Python EPC来实现Emacs进程和Python进程的控制指令和跨进程消息通讯
3. 通过Qt5的QGraphicsScene来实现镜像窗口以对应Emacs的Buffer/Window模型
若想了解更多EAF设计背景请看[Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki/Hacking)
### EAF vs EXWM?
1. EAF和EXWM的共同点都是“提升Emacs和别的程序的协作效率“
2. EXWM是一个X11窗口管理器通过X11协议来控制Emacs和其他程序但是EXWM只是管理其他程序但是它并不会修改别的程序。比如它没法修改ChromePDF阅读器等GUI程序内在行为
2. EXWM是一个X11窗口管理器通过X11协议来控制Emacs和其他程序但是EXWM只是管理其他程序但是它并不会修改应用程序的内在行为
3. EAF不是一个窗口管理器EAF只是依赖Emacs自身的窗口管理功能显示自己
4. EAF的目标是通过PyQt创造新的应用来扩展Emacs的多媒体能力。从Emacs本身的Buffer/Mode设计上看它和你平常用的 `xx-mode` 插件没有啥区别只是它用Qt来绘制内容而不是Emacs自身的文本库来绘制内容
5. EAF通过造轮子的方式把大多数程序员常用的应用写出来以后达到Live in Emacs的最终目标
@@ -181,23 +192,19 @@ EAF主要实现这几个功能
或许EAF和EXWM看起来有点相似但它们在设计和理念上是两个完全不同的项目。所以请大家多多学习X11和Qt的区别理解技术的本质避免无意义的比较和争论。
### 为什么EAF只能在Linux下工作?
1. DBus是Linux下专用的进程间通讯技术其他操作系统可能无法支持DBus
2. Qt5的QGraphicsScene技术无法在MacOS下正常工作也就无法实现Qt5应用的镜像窗口以支持Emacs的Buffer/Window模型
### 为什么EAF无法在MacOS下工作?
1. Qt5的QGraphicsScene技术无法在MacOS下正常工作也就无法实现Qt5应用的镜像窗口以支持Emacs的Buffer/Window模型
2. QWindow Reparent技术无法在MacOS下正常工作也就无法实现Qt应用进程的窗口粘贴到Emacs对应的Buffer区域
欢迎操作系统级别黑客移植EAF目前为止我知道的主要的迁移障碍就只有两个DBusQGraphicsScene
### 为什么EAF的js-video-player在Windows下无法播放视频文件
`js-video-player`需要qtwebengine编译时链接到ffmpeg才能支持额外的编码如`h264/aac`.
### `[EAF] *eaf* aborted (core dumped)` 奔溃了怎么办
请检查 `*eaf*` 这个窗口的内容。通常是EAF的Python依赖没有安装好如果你确定依赖没有问题请附带 `*eaf*` 窗口的内容给我们提交issue那里面有很多线索可以帮助我们排查问题。
### 为什么通过窗口管理器使用EAF无法接收输入信息
EAF确认可以工作的桌面环境或者窗口管理器包括KDE、Gnome2、Gnome3、Mate、XFce、LXDE、i3、QTile、Xpra.
### Github 个人访问标记干什么用的?
Markdown预览程序依赖grip你需要访问[Github Personal access token](https://github.com/settings/tokens/new?scopes=)去获取你个人的标记然后通过下面的命令设置标记后grip才能正常的工作
我们认为不同的窗口管理器对于X11协议的支持不够完善才导致这样的问题。
```Elisp
(setq eaf-grip-token "yourtokencode")
```
尽管不设置访问标记一开始也能成功使用但Github过段时间会弹出 "GitHub Rate Limit Reached" 的错误。
现在的解决方案是将命令`wmctrl -m`中Name的值加入`eaf-wm-focus-fix-wms`如果还有问题请在Github提出issue。
### 代理
可以通过下面设置来通过代理访问互联网:
@@ -224,9 +231,11 @@ Markdown预览程序依赖grip你需要访问[Github Personal access token](h
### 反馈安装和配置问题之前,请一定先阅读[Wiki](https://github.com/manateelazycat/emacs-application-framework/wiki)!!!
如果你遇到任何问题,请先用命令 `emacs -q` 并只添加EAF配置做一个对比测试如果 `emacs -q` 的时候可以工作,请检查你个人的配置文件
如果你使用中遇到任何问题,并且问题是`git pull`后出现的,请先阅读[Discussions](https://github.com/manateelazycat/emacs-application-framework/discussions/527)页面
如果```emacs -q```环境下问题依旧,请到[这里](https://github.com/manateelazycat/emacs-application-framework/issues/new)反馈
关于其他问题,请用命令 `emacs -q` 并只添加EAF配置做一个对比测试如果 `emacs -q` 可以正常工作,请检查你个人的配置文件
如果`emacs -q`环境下问题依旧,请到[这里](https://github.com/manateelazycat/emacs-application-framework/issues/new)反馈, 并附带 `*eaf*` 窗口的内容给我们提交issue那里面有很多线索可以帮助我们排查问题。。
如果你遇到崩溃的问题, 请用下面的方式来收集崩溃信息:
1. 先安装gdb并打开选项 `eaf-enable-debug`

View File

@@ -49,12 +49,18 @@ class AppBuffer(BrowserBuffer):
self.buffer_widget.translate_selected_text.connect(self.translate_text)
self.buffer_widget.open_url_in_new_tab.connect(self.open_url_in_new_tab)
self.buffer_widget.duplicate_page_in_new_tab.connect(self.duplicate_page_in_new_tab)
self.buffer_widget.open_url_in_background_tab.connect(self.open_url_in_background_tab)
# Reset to default zoom when page init or url changed.
self.reset_default_zoom()
self.buffer_widget.urlChanged.connect(self.set_adblocker)
self.buffer_widget.urlChanged.connect(self.caret_exit)
# Record url when url changed.
self.buffer_widget.urlChanged.connect(self.update_url)
def update_url(self, url):
self.reset_default_zoom()
self.url = self.buffer_widget.url().toString()
def set_adblocker(self, url):
if self.emacs_var_dict["eaf-browser-enable-adblocker"] == "true" and not self.page_closed:
self.buffer_widget.load_adblocker()

View File

@@ -24,7 +24,7 @@ from PyQt5.QtGui import QBrush
from PyQt5.QtGui import QColor
from PyQt5.QtMultimedia import QCameraInfo, QCamera, QCameraImageCapture
from PyQt5.QtMultimediaWidgets import QGraphicsVideoItem
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView
from PyQt5.QtWidgets import QGraphicsScene, QGraphicsView, QFrame
from PyQt5.QtWidgets import QWidget, QVBoxLayout
from core.buffer import Buffer
from pathlib import Path
@@ -34,6 +34,9 @@ import os
class AppBuffer(Buffer):
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path):
Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, True)
self.background_color = QColor(0, 0, 0)
self.add_widget(CameraWidget(QColor(0, 0, 0, 255)))
def all_views_hide(self):
@@ -46,9 +49,12 @@ class AppBuffer(Buffer):
def take_photo(self):
if os.path.exists(os.path.expanduser(self.emacs_var_dict["eaf-camera-save-path"])):
self.buffer_widget.take_photo(self.emacs_var_dict["eaf-camera-save-path"])
location = self.emacs_var_dict["eaf-camera-save-path"]
else:
self.buffer_widget.take_photo("~/Downloads")
location = "~/Downloads"
result = self.buffer_widget.take_photo(location)
if result:
self.message_to_emacs.emit("Captured Photo at " + location)
def destroy_buffer(self):
self.buffer_widget.stop_camera()
@@ -65,13 +71,13 @@ class CameraWidget(QWidget):
self.graphics_view = QGraphicsView(self.scene)
self.graphics_view.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.graphics_view.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.graphics_view.setFrameStyle(0)
self.graphics_view.setStyleSheet("QGraphicsView {background: transparent; border: 3px; outline: none;}")
self.graphics_view.setFrameStyle(QFrame.NoFrame)
self.graphics_view.scale(-1, 1) # this make live video from camero mirror.
self.video_item = QGraphicsVideoItem()
self.scene.addItem(self.video_item)
self.layout = QVBoxLayout(self)
self.layout.setSpacing(0)
self.layout.setContentsMargins(0, 0, 0, 0)
self.layout.addWidget(self.graphics_view)
@@ -93,9 +99,8 @@ class CameraWidget(QWidget):
def take_photo(self, camera_save_path):
image_capture = QCameraImageCapture(self.camera)
save_path = str(Path(os.path.expanduser(camera_save_path)))
photo_path = os.path.join(save_path, "EAF_Camera_Photo_" + time.strftime("%Y-%m-%d_%H:%M:%S", time.localtime(int(time.time()))))
image_capture.capture(photo_path)
self.message_to_emacs.emit("Captured Photo at " + photo_path)
photo_path = os.path.join(save_path, "EAF_Camera_Photo_" + time.strftime("%Y%m%d_%H%M%S", time.localtime(int(time.time()))))
return image_capture.capture(photo_path)
def stop_camera(self):
self.camera.stop()

View File

@@ -28,6 +28,7 @@ import subprocess
import os
import qrcode
import signal
import tempfile
from core.buffer import Buffer
@@ -76,7 +77,7 @@ class FileUploaderWidget(QWidget):
self.file_name_font.setPointSize(24)
self.file_name_label = QLabel(self)
self.file_name_label.setText("Your file will be share at\n{0}".format(url))
self.file_name_label.setText("Your smartphone file will be shared at\n{0}".format(url))
self.file_name_label.setFont(self.file_name_font)
self.file_name_label.setAlignment(Qt.AlignCenter)
self.file_name_label.setStyleSheet("color: #eee")
@@ -86,7 +87,7 @@ class FileUploaderWidget(QWidget):
self.notify_font = QFont()
self.notify_font.setPointSize(12)
self.notify_label = QLabel(self)
self.notify_label.setText("Scan QR code above to upload a file from your smartphone.\nMake sure the smartphone is connected to the same WiFi network as this computer.")
self.notify_label.setText("Scan the QR code above to upload a file from your smartphone.\nMake sure the smartphone is connected to the same WiFi network as this computer.")
self.notify_label.setFont(self.notify_font)
self.notify_label.setAlignment(Qt.AlignCenter)
self.notify_label.setStyleSheet("color: #eee")
@@ -107,8 +108,10 @@ class FileUploaderWidget(QWidget):
self.qrcode_label.setPixmap(qrcode.make(self.address, image_factory=Image).pixmap())
tmp_db_file = os.path.join(tempfile.gettempdir(), "filebrowser.db")
self.background_process = subprocess.Popen(
"cd {0} && filebrowser --noauth -d /tmp/filebrowser.db --address {1} -p {2}".format(url, self.local_ip, self.port),
"filebrowser --noauth -d {0} --address {1} -p {2}".format(tmp_db_file, self.local_ip, self.port),
cwd=url,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
shell=True)

View File

@@ -22,7 +22,7 @@
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QColor
from core.browser import BrowserBuffer
from core.utils import PostGui
from core.utils import interactive
from pathlib import Path
import os
@@ -30,16 +30,20 @@ class AppBuffer(BrowserBuffer):
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path):
BrowserBuffer.__init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path, False)
self.index_file = os.path.join(os.path.dirname(__file__), "index.html")
self.load_image(url)
def load_image(self, url):
self.url = url
self.parent_dir = os.path.abspath(os.path.join(url, os.pardir))
self.image_name = os.path.basename(url)
self.buffer_widget.setUrl(QUrl("file://" + self.url))
with open(self.index_file, "r") as f:
html = f.read().replace("%1", os.path.join(os.path.dirname(__file__))).replace("%2", os.path.join("file://", url))
self.buffer_widget.setHtml(html, QUrl("file://"))
def is_image_file(self, f):
return Path(f).suffix.lower() in ["jpg", "jpeg", "png", "bmp", "gif", "svg", "webp"]
return Path(f).suffix[1:].lower() in ["jpg", "jpeg", "png", "bmp", "gif", "svg", "webp"]
def get_same_dir_images(self):
files = [f for f in os.listdir(self.parent_dir) if os.path.isfile(os.path.join(self.parent_dir, f))]
@@ -54,7 +58,9 @@ class AppBuffer(BrowserBuffer):
else:
image_index += 1
self.load_image(os.path.join(self.parent_dir, images[image_index]))
self.image_name = images[image_index]
self.load_image(os.path.join(self.parent_dir, self.image_name))
self.change_title(self.image_name)
def load_prev_image(self):
images = self.get_same_dir_images()
@@ -65,4 +71,39 @@ class AppBuffer(BrowserBuffer):
else:
image_index -= 1
self.load_image(os.path.join(self.parent_dir, images[image_index]))
self.image_name = images[image_index]
self.load_image(os.path.join(self.parent_dir, self.image_name))
self.change_title(self.image_name)
@interactive
def rotate_left(self):
self.buffer_widget.eval_js("rotate_left();")
@interactive
def rotate_right(self):
self.buffer_widget.eval_js("rotate_right();")
@interactive
def zoom_out(self):
self.buffer_widget.eval_js("zoom_out();")
@interactive
def zoom_in(self):
self.buffer_widget.eval_js("zoom_in();")
@interactive
def zoom_reset(self):
self.buffer_widget.eval_js("zoom_reset();")
@interactive
def zoom_toggle(self):
self.buffer_widget.eval_js("zoom_toggle();")
@interactive
def flip_horizontal(self):
self.buffer_widget.eval_js("flip_horizontal();")
@interactive
def flip_vertical(self):
self.buffer_widget.eval_js("flip_vertical();")

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="%1/node_modules/viewerjs/dist/viewer.js"></script>
<link rel="stylesheet" href="%1/node_modules/viewerjs/dist/viewer.css" />
<style>
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
background: #7F7F7F;
}
img {
display: none;
background: #7F7F7F;
}
.viewer-fullscreen, .viewer-fullscreen-exit {
display: none;
}
</style>
</head>
<body>
<div>
<img id="image" src="%2">
</div>
<script type="text/javascript">
// View an image
const viewer = new Viewer(document.getElementById('image'), {
inline: true,
navbar: false,
transition: false,
toolbar: {
zoomIn: 4,
zoomOut: 4,
oneToOne: 4,
reset: 4,
rotateLeft: 4,
rotateRight: 4,
flipHorizontal: 4,
flipVertical: 4,
},
view() {
viewer.full();
},
});
function rotate_left() {
viewer.rotate(-90);
}
function rotate_right() {
viewer.rotate(90);
}
function zoom_out() {
viewer.zoom(-0.1, true);
}
function zoom_in() {
viewer.zoom(0.1, true);
}
function zoom_reset() {
viewer.reset();
}
function zoom_toggle() {
viewer.toggle();
}
function flip_horizontal() {
viewer.scaleX(-viewer.imageData.scaleX || -1);
}
function flip_vertical() {
viewer.scaleY(-viewer.imageData.scaleY || -1);
}
</script>
</body>
</html>

View File

@@ -0,0 +1,13 @@
{
"name": "eaf-image-viewer",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"viewerjs": {
"version": "1.9.0",
"resolved": "https://registry.npm.taobao.org/viewerjs/download/viewerjs-1.9.0.tgz",
"integrity": "sha1-bfr1REDDsvdpG4Vma6bSdwjtlZI="
}
}
}

View File

@@ -0,0 +1,23 @@
{
"name": "eaf-image-viewer",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/manateelazycat/emacs-application-framework.git"
},
"author": "",
"license": "GPL-3.0-or-later",
"bugs": {
"url": "https://github.com/manateelazycat/emacs-application-framework/issues"
},
"homepage": "https://github.com/manateelazycat/emacs-application-framework#readme",
"dependencies": {
"viewerjs": "^1.9.0"
}
}

View File

@@ -193,7 +193,7 @@ buffer."
))
(defun eaf-interleave-add-file-url ()
"Add new url on note if property is none. else modify current url"
"Add a new url on note if the property is none, else modify current url."
(interactive)
(let ((url (read-file-name "Please specify path: " nil nil t)))
(org-entry-put (point) eaf-interleave--url-prop url)))
@@ -212,7 +212,7 @@ This show the previous notes and synchronizes the PDF to the right page number."
(eaf-interleave-sync-current-note))
(defun eaf-interleave-open-notes-file ()
"Find current EAF url corresponding note files if exists"
"Find current EAF url corresponding note files if it exists."
(interactive)
(if (derived-mode-p 'eaf-mode)
(cond ((equal eaf--buffer-app-name "pdf-viewer")
@@ -463,12 +463,12 @@ Consider a headline with property PROPERTY as parent headline."
(defun eaf-interleave--pdf-viewer-current-page (url)
"get current page index."
(let ((id (buffer-local-value 'eaf--buffer-id (eaf-interleave--find-buffer url))))
(string-to-number (eaf-call "call_function" id "current_page"))))
(string-to-number (eaf-call-sync "call_function" id "current_page"))))
(defun eaf-interleave--pdf-viewer-goto-page (url page)
"goto page"
(let ((id (buffer-local-value 'eaf--buffer-id (eaf-interleave--find-buffer url))))
(eaf-call "handle_input_message" id "jump_page" page)))
(eaf-call-async "handle_input_response" id "jump_page" page)))
(defun eaf-interleave--ensure-buffer-window (buffer)
"If BUFFER don't display, will use other window display"

View File

@@ -36,8 +36,8 @@ class AppBuffer(BrowserBuffer):
BrowserBuffer.__init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path, False)
self.url = url
index_file = "file://" + (os.path.join(os.path.dirname(__file__), "index.html"))
self.buffer_widget.setUrl(QUrl(index_file))
index_file = os.path.join(os.path.dirname(__file__), "index.html")
self.buffer_widget.setUrl(QUrl.fromLocalFile(index_file))
for method_name in ["toggle_play", "forward", "backward", "restart", "increase_volume", "decrease_volume"]:
self.build_js_method(method_name)
@@ -55,7 +55,7 @@ class AppBuffer(BrowserBuffer):
self.buffer_widget.eval_js("set_current_time('{}');".format(self.position))
def play_video(self):
self.buffer_widget.eval_js("play('{}');".format("file://" + self.url))
self.buffer_widget.eval_js("play(\"{}\");".format(QUrl.fromLocalFile(self.url).toString()))
def build_js_method(self, method_name):
def _do ():

View File

@@ -1,19 +0,0 @@
Copyright (c) 2014-2020 Denis Pushkarev
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.

View File

@@ -1,58 +0,0 @@
# core-js
[![Sponsors on Open Collective](https://opencollective.com/core-js/sponsors/badge.svg)](#sponsors) [![Backers on Open Collective](https://opencollective.com/core-js/backers/badge.svg)](#backers) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zloirock/core-js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![npm downloads](https://img.shields.io/npm/dm/core-js.svg)](http://npm-stat.com/charts.html?package=core-js&author=&from=2014-11-18) [![Build Status](https://travis-ci.org/zloirock/core-js.svg)](https://travis-ci.org/zloirock/core-js) [![devDependency status](https://david-dm.org/zloirock/core-js/dev-status.svg)](https://david-dm.org/zloirock/core-js?type=dev)
> Modular standard library for JavaScript. Includes polyfills for [ECMAScript up to 2019](https://github.com/zloirock/core-js#ecmascript): [promises](https://github.com/zloirock/core-js#ecmascript-promise), [symbols](https://github.com/zloirock/core-js#ecmascript-symbol), [collections](https://github.com/zloirock/core-js#ecmascript-collections), iterators, [typed arrays](https://github.com/zloirock/core-js#ecmascript-typed-arrays), many other features, [ECMAScript proposals](https://github.com/zloirock/core-js#ecmascript-proposals), [some cross-platform WHATWG / W3C features and proposals](#web-standards) like [`URL`](https://github.com/zloirock/core-js#url-and-urlsearchparams). You can load only required features or use it without global namespace pollution.
## As advertising: the author is looking for a good job -)
## [core-js@3, babel and a look into the future](https://github.com/zloirock/core-js/tree/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md)
## Raising funds
`core-js` isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer [**on Open Collective**](https://opencollective.com/core-js) or [**on Patreon**](https://www.patreon.com/zloirock) if you are interested in `core-js`.
---
<a href="https://opencollective.com/core-js/sponsor/0/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/0/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/1/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/1/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/2/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/2/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/3/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/3/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/4/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/4/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/5/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/5/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/6/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/6/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/7/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/7/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/8/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/8/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/9/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/9/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/10/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/10/avatar.svg"></a><a href="https://opencollective.com/core-js/sponsor/11/website" target="_blank"><img src="https://opencollective.com/core-js/sponsor/11/avatar.svg"></a>
---
<a href="https://opencollective.com/core-js#backers" target="_blank"><img src="https://opencollective.com/core-js/backers.svg?width=890"></a>
---
[*Example*](http://goo.gl/a2xexl):
```js
import 'core-js'; // <- at the top of your entry point
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
[1, [2, 3], [4, [5]]].flat(2); // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32
```
*You can load only required features*:
```js
import 'core-js/features/array/from'; // <- at the top of your entry point
import 'core-js/features/array/flat'; // <- at the top of your entry point
import 'core-js/features/set'; // <- at the top of your entry point
import 'core-js/features/promise'; // <- at the top of your entry point
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
[1, [2, 3], [4, [5]]].flat(2); // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32
```
*Or use it without global namespace pollution*:
```js
import from from 'core-js-pure/features/array/from';
import flat from 'core-js-pure/features/array/flat';
import Set from 'core-js-pure/features/set';
import Promise from 'core-js-pure/features/promise';
from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
flat([1, [2, 3], [4, [5]]], 2); // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32
```
**It's a global version (first 2 examples), for more info see [`core-js` documentation](https://github.com/zloirock/core-js/blob/master/README.md).**

View File

@@ -1,23 +0,0 @@
var has = require('./internals/has');
var isArray = require('./internals/is-array');
var isForced = require('./internals/is-forced');
var shared = require('./internals/shared-store');
var data = isForced.data;
var normalize = isForced.normalize;
var USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';
var ASYNC_ITERATOR_PROTOTYPE = 'AsyncIteratorPrototype';
var setAggressivenessLevel = function (object, constant) {
if (isArray(object)) for (var i = 0; i < object.length; i++) data[normalize(object[i])] = constant;
};
module.exports = function (options) {
if (typeof options == 'object') {
setAggressivenessLevel(options.useNative, isForced.NATIVE);
setAggressivenessLevel(options.usePolyfill, isForced.POLYFILL);
setAggressivenessLevel(options.useFeatureDetection, null);
if (has(options, USE_FUNCTION_CONSTRUCTOR)) shared[USE_FUNCTION_CONSTRUCTOR] = !!options[USE_FUNCTION_CONSTRUCTOR];
if (has(options, ASYNC_ITERATOR_PROTOTYPE)) shared[USE_FUNCTION_CONSTRUCTOR] = options[ASYNC_ITERATOR_PROTOTYPE];
}
};

View File

@@ -1 +0,0 @@
This folder contains entry points for [stable ECMAScript features](https://github.com/zloirock/core-js/tree/v3#ecmascript) with dependencies.

View File

@@ -1,5 +0,0 @@
require('../../modules/es.array-buffer.constructor');
require('../../modules/es.object.to-string');
var path = require('../../internals/path');
module.exports = path.ArrayBuffer;

View File

@@ -1,7 +0,0 @@
require('../../modules/es.array-buffer.constructor');
require('../../modules/es.array-buffer.is-view');
require('../../modules/es.array-buffer.slice');
require('../../modules/es.object.to-string');
var path = require('../../internals/path');
module.exports = path.ArrayBuffer;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array-buffer.is-view');
var path = require('../../internals/path');
module.exports = path.ArrayBuffer.isView;

View File

@@ -1 +0,0 @@
require('../../modules/es.array-buffer.slice');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.concat');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'concat');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.copy-within');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'copyWithin');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.iterator');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'entries');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.every');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'every');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.fill');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'fill');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.filter');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'filter');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.find-index');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'findIndex');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.find');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'find');

View File

@@ -1,5 +0,0 @@
require('../../modules/es.array.flat-map');
require('../../modules/es.array.unscopables.flat-map');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'flatMap');

View File

@@ -1,5 +0,0 @@
require('../../modules/es.array.flat');
require('../../modules/es.array.unscopables.flat');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'flat');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.for-each');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'forEach');

View File

@@ -1,5 +0,0 @@
require('../../modules/es.string.iterator');
require('../../modules/es.array.from');
var path = require('../../internals/path');
module.exports = path.Array.from;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.includes');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'includes');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.index-of');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'indexOf');

View File

@@ -1,33 +0,0 @@
require('../../modules/es.string.iterator');
require('../../modules/es.array.from');
require('../../modules/es.array.is-array');
require('../../modules/es.array.of');
require('../../modules/es.array.concat');
require('../../modules/es.array.copy-within');
require('../../modules/es.array.every');
require('../../modules/es.array.fill');
require('../../modules/es.array.filter');
require('../../modules/es.array.find');
require('../../modules/es.array.find-index');
require('../../modules/es.array.flat');
require('../../modules/es.array.flat-map');
require('../../modules/es.array.for-each');
require('../../modules/es.array.includes');
require('../../modules/es.array.index-of');
require('../../modules/es.array.iterator');
require('../../modules/es.array.join');
require('../../modules/es.array.last-index-of');
require('../../modules/es.array.map');
require('../../modules/es.array.reduce');
require('../../modules/es.array.reduce-right');
require('../../modules/es.array.reverse');
require('../../modules/es.array.slice');
require('../../modules/es.array.some');
require('../../modules/es.array.sort');
require('../../modules/es.array.species');
require('../../modules/es.array.splice');
require('../../modules/es.array.unscopables.flat');
require('../../modules/es.array.unscopables.flat-map');
var path = require('../../internals/path');
module.exports = path.Array;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.is-array');
var path = require('../../internals/path');
module.exports = path.Array.isArray;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.iterator');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'values');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.join');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'join');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.iterator');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'keys');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.last-index-of');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'lastIndexOf');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.map');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'map');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.of');
var path = require('../../internals/path');
module.exports = path.Array.of;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.reduce-right');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'reduceRight');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.reduce');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'reduce');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.reverse');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'reverse');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.slice');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'slice');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.some');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'some');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.sort');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'sort');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.splice');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'splice');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.array.iterator');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Array', 'values');

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.concat');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').concat;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.copy-within');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').copyWithin;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.iterator');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').entries;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.every');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').every;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.fill');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').fill;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.filter');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').filter;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.find-index');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').findIndex;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.find');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').find;

View File

@@ -1,5 +0,0 @@
require('../../../modules/es.array.flat-map');
require('../../../modules/es.array.unscopables.flat-map');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').flatMap;

View File

@@ -1,5 +0,0 @@
require('../../../modules/es.array.flat');
require('../../../modules/es.array.unscopables.flat');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').flat;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.for-each');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').forEach;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.includes');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').includes;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.index-of');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').indexOf;

View File

@@ -1,29 +0,0 @@
require('../../../modules/es.array.concat');
require('../../../modules/es.array.copy-within');
require('../../../modules/es.array.every');
require('../../../modules/es.array.fill');
require('../../../modules/es.array.filter');
require('../../../modules/es.array.find');
require('../../../modules/es.array.find-index');
require('../../../modules/es.array.flat');
require('../../../modules/es.array.flat-map');
require('../../../modules/es.array.for-each');
require('../../../modules/es.array.includes');
require('../../../modules/es.array.index-of');
require('../../../modules/es.array.iterator');
require('../../../modules/es.array.join');
require('../../../modules/es.array.last-index-of');
require('../../../modules/es.array.map');
require('../../../modules/es.array.reduce');
require('../../../modules/es.array.reduce-right');
require('../../../modules/es.array.reverse');
require('../../../modules/es.array.slice');
require('../../../modules/es.array.some');
require('../../../modules/es.array.sort');
require('../../../modules/es.array.species');
require('../../../modules/es.array.splice');
require('../../../modules/es.array.unscopables.flat');
require('../../../modules/es.array.unscopables.flat-map');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array');

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.iterator');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').values;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.join');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').join;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.iterator');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').keys;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.last-index-of');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').lastIndexOf;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.map');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').map;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.reduce-right');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').reduceRight;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.reduce');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').reduce;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.reverse');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').reverse;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.slice');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').slice;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.some');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').some;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.sort');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').sort;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.splice');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').splice;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.array.iterator');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Array').values;

View File

@@ -1,5 +0,0 @@
require('../../modules/es.data-view');
require('../../modules/es.object.to-string');
var path = require('../../internals/path');
module.exports = path.DataView;

View File

@@ -1,8 +0,0 @@
require('../../modules/es.date.now');
require('../../modules/es.date.to-json');
require('../../modules/es.date.to-iso-string');
require('../../modules/es.date.to-string');
require('../../modules/es.date.to-primitive');
var path = require('../../internals/path');
module.exports = path.Date;

View File

@@ -1,4 +0,0 @@
require('../../modules/es.date.now');
var path = require('../../internals/path');
module.exports = path.Date.now;

View File

@@ -1,5 +0,0 @@
require('../../modules/es.date.to-iso-string');
require('../../modules/es.date.to-json');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Date', 'toISOString');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.date.to-json');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Date', 'toJSON');

View File

@@ -1,6 +0,0 @@
require('../../modules/es.date.to-primitive');
var toPrimitive = require('../../internals/date-to-primitive');
module.exports = function (it, hint) {
return toPrimitive.call(it, hint);
};

View File

@@ -1,6 +0,0 @@
require('../../modules/es.date.to-string');
var dateToString = Date.prototype.toString;
module.exports = function toString(it) {
return dateToString.call(it);
};

View File

@@ -1,4 +0,0 @@
require('../../modules/es.function.bind');
var entryUnbind = require('../../internals/entry-unbind');
module.exports = entryUnbind('Function', 'bind');

View File

@@ -1,4 +0,0 @@
require('../../modules/es.function.has-instance');
var wellKnownSymbol = require('../../internals/well-known-symbol');
module.exports = Function[wellKnownSymbol('hasInstance')];

View File

@@ -1,6 +0,0 @@
require('../../modules/es.function.bind');
require('../../modules/es.function.name');
require('../../modules/es.function.has-instance');
var path = require('../../internals/path');
module.exports = path.Function;

View File

@@ -1 +0,0 @@
require('../../modules/es.function.name');

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.function.bind');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Function').bind;

View File

@@ -1,4 +0,0 @@
require('../../../modules/es.function.bind');
var entryVirtual = require('../../../internals/entry-virtual');
module.exports = entryVirtual('Function');

View File

@@ -1,3 +0,0 @@
require('../modules/es.global-this');
module.exports = require('../internals/global');

View File

@@ -1,210 +0,0 @@
require('../modules/es.symbol');
require('../modules/es.symbol.async-iterator');
require('../modules/es.symbol.description');
require('../modules/es.symbol.has-instance');
require('../modules/es.symbol.is-concat-spreadable');
require('../modules/es.symbol.iterator');
require('../modules/es.symbol.match');
require('../modules/es.symbol.match-all');
require('../modules/es.symbol.replace');
require('../modules/es.symbol.search');
require('../modules/es.symbol.species');
require('../modules/es.symbol.split');
require('../modules/es.symbol.to-primitive');
require('../modules/es.symbol.to-string-tag');
require('../modules/es.symbol.unscopables');
require('../modules/es.object.assign');
require('../modules/es.object.create');
require('../modules/es.object.define-property');
require('../modules/es.object.define-properties');
require('../modules/es.object.entries');
require('../modules/es.object.freeze');
require('../modules/es.object.from-entries');
require('../modules/es.object.get-own-property-descriptor');
require('../modules/es.object.get-own-property-descriptors');
require('../modules/es.object.get-own-property-names');
require('../modules/es.object.get-prototype-of');
require('../modules/es.object.is');
require('../modules/es.object.is-extensible');
require('../modules/es.object.is-frozen');
require('../modules/es.object.is-sealed');
require('../modules/es.object.keys');
require('../modules/es.object.prevent-extensions');
require('../modules/es.object.seal');
require('../modules/es.object.set-prototype-of');
require('../modules/es.object.values');
require('../modules/es.object.to-string');
require('../modules/es.object.define-getter');
require('../modules/es.object.define-setter');
require('../modules/es.object.lookup-getter');
require('../modules/es.object.lookup-setter');
require('../modules/es.function.bind');
require('../modules/es.function.name');
require('../modules/es.function.has-instance');
require('../modules/es.global-this');
require('../modules/es.array.from');
require('../modules/es.array.is-array');
require('../modules/es.array.of');
require('../modules/es.array.concat');
require('../modules/es.array.copy-within');
require('../modules/es.array.every');
require('../modules/es.array.fill');
require('../modules/es.array.filter');
require('../modules/es.array.find');
require('../modules/es.array.find-index');
require('../modules/es.array.flat');
require('../modules/es.array.flat-map');
require('../modules/es.array.for-each');
require('../modules/es.array.includes');
require('../modules/es.array.index-of');
require('../modules/es.array.join');
require('../modules/es.array.last-index-of');
require('../modules/es.array.map');
require('../modules/es.array.reduce');
require('../modules/es.array.reduce-right');
require('../modules/es.array.reverse');
require('../modules/es.array.slice');
require('../modules/es.array.some');
require('../modules/es.array.sort');
require('../modules/es.array.splice');
require('../modules/es.array.species');
require('../modules/es.array.unscopables.flat');
require('../modules/es.array.unscopables.flat-map');
require('../modules/es.array.iterator');
require('../modules/es.string.from-code-point');
require('../modules/es.string.raw');
require('../modules/es.string.code-point-at');
require('../modules/es.string.ends-with');
require('../modules/es.string.includes');
require('../modules/es.string.match');
require('../modules/es.string.match-all');
require('../modules/es.string.pad-end');
require('../modules/es.string.pad-start');
require('../modules/es.string.repeat');
require('../modules/es.string.replace');
require('../modules/es.string.search');
require('../modules/es.string.split');
require('../modules/es.string.starts-with');
require('../modules/es.string.trim');
require('../modules/es.string.trim-start');
require('../modules/es.string.trim-end');
require('../modules/es.string.iterator');
require('../modules/es.string.anchor');
require('../modules/es.string.big');
require('../modules/es.string.blink');
require('../modules/es.string.bold');
require('../modules/es.string.fixed');
require('../modules/es.string.fontcolor');
require('../modules/es.string.fontsize');
require('../modules/es.string.italics');
require('../modules/es.string.link');
require('../modules/es.string.small');
require('../modules/es.string.strike');
require('../modules/es.string.sub');
require('../modules/es.string.sup');
require('../modules/es.regexp.constructor');
require('../modules/es.regexp.exec');
require('../modules/es.regexp.flags');
require('../modules/es.regexp.sticky');
require('../modules/es.regexp.test');
require('../modules/es.regexp.to-string');
require('../modules/es.parse-int');
require('../modules/es.parse-float');
require('../modules/es.number.constructor');
require('../modules/es.number.epsilon');
require('../modules/es.number.is-finite');
require('../modules/es.number.is-integer');
require('../modules/es.number.is-nan');
require('../modules/es.number.is-safe-integer');
require('../modules/es.number.max-safe-integer');
require('../modules/es.number.min-safe-integer');
require('../modules/es.number.parse-float');
require('../modules/es.number.parse-int');
require('../modules/es.number.to-fixed');
require('../modules/es.number.to-precision');
require('../modules/es.math.acosh');
require('../modules/es.math.asinh');
require('../modules/es.math.atanh');
require('../modules/es.math.cbrt');
require('../modules/es.math.clz32');
require('../modules/es.math.cosh');
require('../modules/es.math.expm1');
require('../modules/es.math.fround');
require('../modules/es.math.hypot');
require('../modules/es.math.imul');
require('../modules/es.math.log10');
require('../modules/es.math.log1p');
require('../modules/es.math.log2');
require('../modules/es.math.sign');
require('../modules/es.math.sinh');
require('../modules/es.math.tanh');
require('../modules/es.math.to-string-tag');
require('../modules/es.math.trunc');
require('../modules/es.date.now');
require('../modules/es.date.to-json');
require('../modules/es.date.to-iso-string');
require('../modules/es.date.to-string');
require('../modules/es.date.to-primitive');
require('../modules/es.json.stringify');
require('../modules/es.json.to-string-tag');
require('../modules/es.promise');
require('../modules/es.promise.all-settled');
require('../modules/es.promise.finally');
require('../modules/es.map');
require('../modules/es.set');
require('../modules/es.weak-map');
require('../modules/es.weak-set');
require('../modules/es.array-buffer.constructor');
require('../modules/es.array-buffer.is-view');
require('../modules/es.array-buffer.slice');
require('../modules/es.data-view');
require('../modules/es.typed-array.int8-array');
require('../modules/es.typed-array.uint8-array');
require('../modules/es.typed-array.uint8-clamped-array');
require('../modules/es.typed-array.int16-array');
require('../modules/es.typed-array.uint16-array');
require('../modules/es.typed-array.int32-array');
require('../modules/es.typed-array.uint32-array');
require('../modules/es.typed-array.float32-array');
require('../modules/es.typed-array.float64-array');
require('../modules/es.typed-array.from');
require('../modules/es.typed-array.of');
require('../modules/es.typed-array.copy-within');
require('../modules/es.typed-array.every');
require('../modules/es.typed-array.fill');
require('../modules/es.typed-array.filter');
require('../modules/es.typed-array.find');
require('../modules/es.typed-array.find-index');
require('../modules/es.typed-array.for-each');
require('../modules/es.typed-array.includes');
require('../modules/es.typed-array.index-of');
require('../modules/es.typed-array.iterator');
require('../modules/es.typed-array.join');
require('../modules/es.typed-array.last-index-of');
require('../modules/es.typed-array.map');
require('../modules/es.typed-array.reduce');
require('../modules/es.typed-array.reduce-right');
require('../modules/es.typed-array.reverse');
require('../modules/es.typed-array.set');
require('../modules/es.typed-array.slice');
require('../modules/es.typed-array.some');
require('../modules/es.typed-array.sort');
require('../modules/es.typed-array.subarray');
require('../modules/es.typed-array.to-locale-string');
require('../modules/es.typed-array.to-string');
require('../modules/es.reflect.apply');
require('../modules/es.reflect.construct');
require('../modules/es.reflect.define-property');
require('../modules/es.reflect.delete-property');
require('../modules/es.reflect.get');
require('../modules/es.reflect.get-own-property-descriptor');
require('../modules/es.reflect.get-prototype-of');
require('../modules/es.reflect.has');
require('../modules/es.reflect.is-extensible');
require('../modules/es.reflect.own-keys');
require('../modules/es.reflect.prevent-extensions');
require('../modules/es.reflect.set');
require('../modules/es.reflect.set-prototype-of');
var path = require('../internals/path');
module.exports = path;

View File

@@ -1,8 +0,0 @@
var bind = require('../function/virtual/bind');
var FunctionPrototype = Function.prototype;
module.exports = function (it) {
var own = it.bind;
return it === FunctionPrototype || (it instanceof Function && own === FunctionPrototype.bind) ? bind : own;
};

View File

@@ -1,9 +0,0 @@
var codePointAt = require('../string/virtual/code-point-at');
var StringPrototype = String.prototype;
module.exports = function (it) {
var own = it.codePointAt;
return typeof it === 'string' || it === StringPrototype
|| (it instanceof String && own === StringPrototype.codePointAt) ? codePointAt : own;
};

View File

@@ -1,8 +0,0 @@
var concat = require('../array/virtual/concat');
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.concat;
return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.concat) ? concat : own;
};

View File

@@ -1,8 +0,0 @@
var copyWithin = require('../array/virtual/copy-within');
var ArrayPrototype = Array.prototype;
module.exports = function (it) {
var own = it.copyWithin;
return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.copyWithin) ? copyWithin : own;
};

Some files were not shown because too many files have changed in this diff Show More