Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
24
my-app/node_modules/@ljharb/through/.eslintrc
generated
vendored
Executable file
24
my-app/node_modules/@ljharb/through/.eslintrc
generated
vendored
Executable file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb/eslint-config/node/0.4",
|
||||
|
||||
"rules": {
|
||||
"consistent-return": "warn",
|
||||
"func-style": "warn",
|
||||
"max-lines-per-function": "off",
|
||||
"max-statements-per-line": "warn",
|
||||
"no-invalid-this": "warn",
|
||||
"no-param-reassign": "warn",
|
||||
"no-underscore-dangle": "warn",
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"no-plusplus": "warn",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
my-app/node_modules/@ljharb/through/.github/FUNDING.yml
generated
vendored
Executable file
12
my-app/node_modules/@ljharb/through/.github/FUNDING.yml
generated
vendored
Executable file
|
@ -0,0 +1,12 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/@ljharb/through
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with a single custom sponsorship URL
|
13
my-app/node_modules/@ljharb/through/.nycrc
generated
vendored
Executable file
13
my-app/node_modules/@ljharb/through/.nycrc
generated
vendored
Executable file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
261
my-app/node_modules/@ljharb/through/CHANGELOG.md
generated
vendored
Executable file
261
my-app/node_modules/@ljharb/through/CHANGELOG.md
generated
vendored
Executable file
|
@ -0,0 +1,261 @@
|
|||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.3.12](https://github.com/ljharb/through/compare/v2.3.11...v2.3.12) - 2024-01-24
|
||||
|
||||
### Commits
|
||||
|
||||
- [patch] add TS types [`0b68b9d`](https://github.com/ljharb/through/commit/0b68b9dc1655edbf5dc81cccdb3ef23dcd8e4bbd)
|
||||
- [readme] correct requires; remove redundant license section [`90ff780`](https://github.com/ljharb/through/commit/90ff780f9c3f2c2fb345b33c87e0be080dbf7950)
|
||||
- [Dev Deps] update `aud`, `npmignore`, `tape` [`f4456ce`](https://github.com/ljharb/through/commit/f4456ceaf2b216858e7652c9eef8d96badbad678)
|
||||
- [Deps] update `call-bind` [`c1b7daa`](https://github.com/ljharb/through/commit/c1b7daaf9ea8138d90caf7cfe7250a09760034c2)
|
||||
- [Dev Deps] update `tape` [`74a75ac`](https://github.com/ljharb/through/commit/74a75acadcca26c71ec15f0f0d48e3a9265cebf3)
|
||||
- [meta] add `sideEffects` flag [`dcfef36`](https://github.com/ljharb/through/commit/dcfef3615e7df63219aa6184469f4b2a1e61cb0b)
|
||||
|
||||
## [v2.3.11](https://github.com/ljharb/through/compare/v2.3.10...v2.3.11) - 2023-10-11
|
||||
|
||||
### Commits
|
||||
|
||||
- [Deps] add missing `call-bind` [`da5e46d`](https://github.com/ljharb/through/commit/da5e46d31045e18b79dc137bbc2bde1ebf839b38)
|
||||
|
||||
## [v2.3.10](https://github.com/ljharb/through/compare/v2.3.9...v2.3.10) - 2023-10-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [Robustness] use `call-bind` [`3fc8de1`](https://github.com/ljharb/through/commit/3fc8de1dd6b5c69ebca1b212d4852ca11e853cb2)
|
||||
- [Dev Deps] update `aud`, `tape` [`db14fcf`](https://github.com/ljharb/through/commit/db14fcf1457d1e35b22856de42767d0bf4773fd8)
|
||||
|
||||
## [v2.3.9](https://github.com/ljharb/through/compare/v2.3.8...v2.3.9) - 2023-07-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] add scripts, dev deps, linting; switch from travis to GHA [`2bc7e2d`](https://github.com/ljharb/through/commit/2bc7e2d1f63caf9cbdd146c9d752d3f62f564405)
|
||||
- [meta] rename package to scoped [`337610b`](https://github.com/ljharb/through/commit/337610b937196ad26abe40c7d191942c0d54f455)
|
||||
- [meta] confirmed with dominictarr in writing that this package was only ever MIT [`832061e`](https://github.com/ljharb/through/commit/832061e15beb9643b74e16b1f8343c36620f5be7)
|
||||
- [Dev Deps] update `from`, `stream-spec`, `tape` [`dae9dda`](https://github.com/ljharb/through/commit/dae9dda68c7df31960239957e7694de1f3bca40a)
|
||||
- [meta] fix auto-changelog start version [`3ac451b`](https://github.com/ljharb/through/commit/3ac451b684d4b4cb9356eb758691e6438b0083d1)
|
||||
- [Fix] `node < v0.6` does not have `stream` === `stream.Stream` [`9f72162`](https://github.com/ljharb/through/commit/9f721627f62dfa4dad1f5515f4d3d1aa3613ccb0)
|
||||
|
||||
<!-- auto-changelog-above -->
|
||||
|
||||
## [v2.3.8](https://github.com/ljharb/through/compare/v2.3.7...v2.3.8) - 2015-07-03
|
||||
|
||||
### Merged
|
||||
|
||||
- Update package.json [`#35`](https://github.com/dominictarr/through/pull/35)
|
||||
|
||||
## [v2.3.7](https://github.com/ljharb/through/compare/v2.3.6...v2.3.7) - 2015-04-06
|
||||
|
||||
### Commits
|
||||
|
||||
- fix non-strict null check [`7048350`](https://github.com/dominictarr/through/commit/7048350a5dae8bbbb3b9a972ecec4fe2460d113d)
|
||||
|
||||
## [v2.3.6](https://github.com/ljharb/through/compare/v2.3.5...v2.3.6) - 2014-09-16
|
||||
|
||||
### Commits
|
||||
|
||||
- simple async test [`a98561f`](https://github.com/dominictarr/through/commit/a98561fae17615da8fe6c9dc00208c5107bf9774)
|
||||
- update test to work in the browser (without process.on("exit") [`7dabce0`](https://github.com/dominictarr/through/commit/7dabce06b4d367f280846a72fe468ace54d55456)
|
||||
- remove concat-stream [`69d31f3`](https://github.com/dominictarr/through/commit/69d31f3efe1600a44787cb198d7b97ae7eaa7167)
|
||||
- add dev deps [`d387710`](https://github.com/dominictarr/through/commit/d387710cccaeec66dc889377778c17254ea13ef4)
|
||||
- validate before end [`c267d90`](https://github.com/dominictarr/through/commit/c267d90e3cdb501510edfd590245fd1d58fe29bd)
|
||||
- use tape@2.3.2 [`1080f0c`](https://github.com/dominictarr/through/commit/1080f0ca8d32813cd50be9eac5975504fb5b8a55)
|
||||
- testling badge [`aa23057`](https://github.com/dominictarr/through/commit/aa23057876709666ab4d02f0cd7a36797de77c80)
|
||||
- tidy [`c5d9757`](https://github.com/dominictarr/through/commit/c5d9757c8c8e31d563dc4a4bbb02a5f7e6304360)
|
||||
|
||||
## [v2.3.5](https://github.com/ljharb/through/compare/v2.3.4...v2.3.5) - 2013-05-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- fix spelling Closes #13 [`#13`](https://github.com/dominictarr/through/issues/13)
|
||||
|
||||
## [v2.3.4](https://github.com/ljharb/through/compare/v2.3.3...v2.3.4) - 2013-04-29
|
||||
|
||||
### Merged
|
||||
|
||||
- mark "write" method as code [`#14`](https://github.com/dominictarr/through/pull/14)
|
||||
|
||||
### Commits
|
||||
|
||||
- fix typo [`e94d772`](https://github.com/dominictarr/through/commit/e94d7726f765e4fcb83169ba845ebbb9fec418c7)
|
||||
|
||||
## [v2.3.3](https://github.com/ljharb/through/compare/v2.3.2...v2.3.3) - 2013-04-24
|
||||
|
||||
### Merged
|
||||
|
||||
- Test on 0.10 on Travis [`#12`](https://github.com/dominictarr/through/pull/12)
|
||||
|
||||
## [v2.3.2](https://github.com/ljharb/through/compare/v2.3.1...v2.3.2) - 2013-04-24
|
||||
|
||||
### Commits
|
||||
|
||||
- check that through ends exactly once [`802ecff`](https://github.com/dominictarr/through/commit/802ecff64d8462be9e1db6a578857393a37b19eb)
|
||||
- emit "end" exactly once [`6f814a6`](https://github.com/dominictarr/through/commit/6f814a601b37db1f44113e56a1eaa0c32a33b0a2)
|
||||
|
||||
## [v2.3.1](https://github.com/ljharb/through/compare/v2.3.0...v2.3.1) - 2013-04-13
|
||||
|
||||
### Commits
|
||||
|
||||
- syntax error [`b90e6ba`](https://github.com/dominictarr/through/commit/b90e6ba08b626899f8007367d2a934714a9cdc23)
|
||||
|
||||
## [v2.3.0](https://github.com/ljharb/through/compare/v2.2.7...v2.3.0) - 2013-04-13
|
||||
|
||||
### Commits
|
||||
|
||||
- test autoDestroy option [`a2e1d5d`](https://github.com/dominictarr/through/commit/a2e1d5dad7f5ace3a174145ab32d58642bc1d685)
|
||||
- document autoDestroy [`c4520e5`](https://github.com/dominictarr/through/commit/c4520e59f6a96f12eebfadef6a746d266b481d25)
|
||||
- implement autoDestroy option [`1cabed2`](https://github.com/dominictarr/through/commit/1cabed2d3a57bec745d6a5c90d0c3077254dadf9)
|
||||
|
||||
## [v2.2.7](https://github.com/ljharb/through/compare/v2.2.6...v2.2.7) - 2013-03-15
|
||||
|
||||
### Merged
|
||||
|
||||
- Typo fix [`#10`](https://github.com/dominictarr/through/pull/10)
|
||||
|
||||
### Commits
|
||||
|
||||
- wider range [`e685bc2`](https://github.com/dominictarr/through/commit/e685bc2299f28d91c5a9d3eac7d929fdcff5767f)
|
||||
|
||||
## [v2.2.6](https://github.com/ljharb/through/compare/v2.2.5...v2.2.6) - 2013-03-13
|
||||
|
||||
### Commits
|
||||
|
||||
- update stream-spec [`1483cd4`](https://github.com/dominictarr/through/commit/1483cd44dbcd089c3bbb9e0111c09a64d0ecb715)
|
||||
|
||||
## [v2.2.5](https://github.com/ljharb/through/compare/v2.2.4...v2.2.5) - 2013-03-13
|
||||
|
||||
### Commits
|
||||
|
||||
- hopefully make this work in browserify [`a346472`](https://github.com/dominictarr/through/commit/a3464727990c9b273cec1b778b59aabb7bbc77c8)
|
||||
- narrow testling range, so it does not take as long [`b1e474b`](https://github.com/dominictarr/through/commit/b1e474b029827673de4b35850d2116e7176171bf)
|
||||
|
||||
## [v2.2.4](https://github.com/ljharb/through/compare/v2.2.3...v2.2.4) - 2013-03-13
|
||||
|
||||
### Commits
|
||||
|
||||
- update stream spec [`f0f0c83`](https://github.com/dominictarr/through/commit/f0f0c83cd32a31dcf897b4eb310210440e975d89)
|
||||
|
||||
## [v2.2.3](https://github.com/ljharb/through/compare/v2.2.2...v2.2.3) - 2013-03-12
|
||||
|
||||
### Commits
|
||||
|
||||
- update stream-spec [`2d2e3e4`](https://github.com/dominictarr/through/commit/2d2e3e4ab429cd9c1a9a9d6b49488040012b0d33)
|
||||
|
||||
## [v2.2.2](https://github.com/ljharb/through/compare/v2.2.1...v2.2.2) - 2013-03-12
|
||||
|
||||
### Commits
|
||||
|
||||
- switch tests to use tape [`4a5652f`](https://github.com/dominictarr/through/commit/4a5652f8ada85dd8d212d558f386e2ab57f36d46)
|
||||
- add testling setup to package.json [`bbe2a05`](https://github.com/dominictarr/through/commit/bbe2a05012b4855624893c24ebed1c24fb3d8107)
|
||||
- fix test command [`12ec8a3`](https://github.com/dominictarr/through/commit/12ec8a34f6155ca7ea504aa1a0eaa30a869c90bc)
|
||||
|
||||
## [v2.2.1](https://github.com/ljharb/through/compare/2.2.0...v2.2.1) - 2013-03-03
|
||||
|
||||
### Merged
|
||||
|
||||
- doc [`#6`](https://github.com/dominictarr/through/pull/6)
|
||||
|
||||
## [2.2.0](https://github.com/ljharb/through/compare/v2.1.0...2.2.0) - 2013-02-11
|
||||
|
||||
### Merged
|
||||
|
||||
- Alias `queue()` to `push()` [`#5`](https://github.com/dominictarr/through/pull/5)
|
||||
|
||||
## [v2.1.0](https://github.com/ljharb/through/compare/v2.0.0...v2.1.0) - 2012-11-27
|
||||
|
||||
### Commits
|
||||
|
||||
- allow chaining [`6fbfd15`](https://github.com/dominictarr/through/commit/6fbfd158bc64a0df1b9cb8e6e462ab8109caaf09)
|
||||
|
||||
## [v2.0.0](https://github.com/ljharb/through/compare/v1.1.2...v2.0.0) - 2012-11-25
|
||||
|
||||
### Commits
|
||||
|
||||
- explain new api [`f5c1702`](https://github.com/dominictarr/through/commit/f5c17027e88d0cb8f51ba02dff058f909064617a)
|
||||
- internal buffer should not be exposed [`97b40cc`](https://github.com/dominictarr/through/commit/97b40ccb4fe3058ad6d2d625c6d03297991a551a)
|
||||
- use queue by default [`105677a`](https://github.com/dominictarr/through/commit/105677a705621f69ac5c2e42dc7f378b62eef937)
|
||||
|
||||
## [v1.1.2](https://github.com/ljharb/through/compare/v1.1.1...v1.1.2) - 2012-11-20
|
||||
|
||||
### Commits
|
||||
|
||||
- Ensure that end will be queued if paused with data [`c3efc00`](https://github.com/dominictarr/through/commit/c3efc00a7f381901096f0b3704aff2e2e3585330)
|
||||
|
||||
## [v1.1.1](https://github.com/ljharb/through/compare/v1.1.0...v1.1.1) - 2012-10-11
|
||||
|
||||
### Commits
|
||||
|
||||
- tidy [`42a2914`](https://github.com/dominictarr/through/commit/42a2914644a52981a9dbc94edbfe2d4677763817)
|
||||
|
||||
## [v1.1.0](https://github.com/ljharb/through/compare/v0.1.4...v1.1.0) - 2012-09-15
|
||||
|
||||
### Commits
|
||||
|
||||
- optional buffering [`63b41c6`](https://github.com/dominictarr/through/commit/63b41c6e073998cd8ed79a729339b1a728be088d)
|
||||
- test for buffering [`9038d80`](https://github.com/dominictarr/through/commit/9038d8062ce4385fa34198d663597fae2b60b86d)
|
||||
- test that end, close event correct [`7438a33`](https://github.com/dominictarr/through/commit/7438a333b3ab43121f654c26230fe0f39e3a33b1)
|
||||
- update docs [`5f55881`](https://github.com/dominictarr/through/commit/5f5588176395d5934287205a599c0789150bc209)
|
||||
- always emit drain [`58ce6ed`](https://github.com/dominictarr/through/commit/58ce6ed1fce57a777e8031384f1fa75ce185ec5d)
|
||||
|
||||
## [v0.1.4](https://github.com/ljharb/through/compare/v0.1.3...v0.1.4) - 2012-08-07
|
||||
|
||||
### Commits
|
||||
|
||||
- package.json: s/repo/repository/ [`6c811fa`](https://github.com/dominictarr/through/commit/6c811fa1c8d90b54f3d41e969720fb405f1de6c1)
|
||||
|
||||
## [v0.1.3](https://github.com/ljharb/through/compare/v0.1.2...v0.1.3) - 2012-08-07
|
||||
|
||||
### Commits
|
||||
|
||||
- fix repo links [`c49724d`](https://github.com/dominictarr/through/commit/c49724d51a4ca6bd3096451f98a7cd5b45b4386f)
|
||||
|
||||
## [v0.1.2](https://github.com/ljharb/through/compare/v0.1.1...v0.1.2) - 2012-07-23
|
||||
|
||||
### Commits
|
||||
|
||||
- do not emit pause event when already paused [`1e5a27e`](https://github.com/dominictarr/through/commit/1e5a27e2c49a82e769f4364126f7315894e81021)
|
||||
|
||||
## [v0.1.1](https://github.com/ljharb/through/compare/v0.1.0...v0.1.1) - 2012-07-23
|
||||
|
||||
### Commits
|
||||
|
||||
- fix typo [`3258738`](https://github.com/dominictarr/through/commit/325873812e1893472ab141b69fe48665cb5b7ac3)
|
||||
|
||||
## [v0.1.0](https://github.com/ljharb/through/compare/v0.0.4...v0.1.0) - 2012-07-23
|
||||
|
||||
### Commits
|
||||
|
||||
- emit pause on entering pause state [`2a003f9`](https://github.com/dominictarr/through/commit/2a003f9896b19978f6111e077acab870e5c9bbf6)
|
||||
|
||||
## [v0.0.4](https://github.com/ljharb/through/compare/v0.0.3...v0.0.4) - 2012-07-07
|
||||
|
||||
### Commits
|
||||
|
||||
- add opensource [`9691145`](https://github.com/dominictarr/through/commit/9691145e2791855294258ab02bbbdbb132a23c43)
|
||||
- a bit better test coverage [`320ee05`](https://github.com/dominictarr/through/commit/320ee05d28b9aa7f0242446b803217947ad8d25f)
|
||||
- do not throw on end if not writable, just ignore [`a04701b`](https://github.com/dominictarr/through/commit/a04701be062484c02d54b6515583b31930bed1f9)
|
||||
|
||||
## [v0.0.3](https://github.com/ljharb/through/compare/v0.0.2...v0.0.3) - 2012-07-05
|
||||
|
||||
### Commits
|
||||
|
||||
- remove from [`682c71e`](https://github.com/dominictarr/through/commit/682c71e0774f6442d7fc64ee4bc9b6a76fead177)
|
||||
- add travis-ci [`8ccc78c`](https://github.com/dominictarr/through/commit/8ccc78c66989845e4f538fe9a041ebfe9f52f672)
|
||||
- don't care about 0.4 [`df41950`](https://github.com/dominictarr/through/commit/df419507a80c30586ada6576780228cc39c5fbda)
|
||||
|
||||
## [v0.0.2](https://github.com/ljharb/through/compare/v0.0.1...v0.0.2) - 2012-07-05
|
||||
|
||||
### Commits
|
||||
|
||||
- document [`b238767`](https://github.com/dominictarr/through/commit/b2387678b54fdb08093eb3e23b54f3e1c8477237)
|
||||
|
||||
## v0.0.1 - 2012-07-05
|
||||
|
||||
### Commits
|
||||
|
||||
- initial [`903501a`](https://github.com/dominictarr/through/commit/903501acf73d03f584dd572b885c78c1bc9cca8b)
|
||||
- add test script [`7359f4d`](https://github.com/dominictarr/through/commit/7359f4dfe0df20938f77bdbdf689eba78b8a0fa4)
|
24
my-app/node_modules/@ljharb/through/LICENSE
generated
vendored
Executable file
24
my-app/node_modules/@ljharb/through/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,24 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2011 Dominic Tarr
|
||||
|
||||
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.
|
81
my-app/node_modules/@ljharb/through/README.md
generated
vendored
Executable file
81
my-app/node_modules/@ljharb/through/README.md
generated
vendored
Executable file
|
@ -0,0 +1,81 @@
|
|||
# @ljharb/through <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
*Note*: This package is a fork of https://npmjs.com/through, and builds off of it.
|
||||
|
||||
[![github actions][actions-image]][actions-url]
|
||||
[![coverage][codecov-image]][codecov-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
Easy way to create a `Stream` that is both `readable` and `writable`.
|
||||
|
||||
* Pass in optional `write` and `end` methods.
|
||||
* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`.
|
||||
* Use `this.pause()` and `this.resume()` to manage flow.
|
||||
* Check `this.paused` to see current flow state. (`write` always returns `!this.paused`).
|
||||
|
||||
This function is the basis for most of the synchronous streams in [event-stream](http://github.com/dominictarr/event-stream).
|
||||
|
||||
``` js
|
||||
var through = require('@ljharb/through')
|
||||
|
||||
through(function write(data) {
|
||||
this.queue(data) //data *must* not be null
|
||||
},
|
||||
function end () { //optional
|
||||
this.queue(null)
|
||||
})
|
||||
```
|
||||
|
||||
Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`,
|
||||
and this.emit('end')
|
||||
|
||||
``` js
|
||||
var through = require('@ljharb/through')
|
||||
|
||||
through(function write(data) {
|
||||
this.emit('data', data)
|
||||
//this.pause()
|
||||
},
|
||||
function end () { //optional
|
||||
this.emit('end')
|
||||
})
|
||||
```
|
||||
|
||||
## Extended Options
|
||||
|
||||
You will probably not need these 99% of the time.
|
||||
|
||||
### autoDestroy=false
|
||||
|
||||
By default, `through` emits close when the writable
|
||||
and readable side of the stream has ended.
|
||||
If that is not desired, set `autoDestroy=false`.
|
||||
|
||||
``` js
|
||||
var through = require('@ljharb/through')
|
||||
|
||||
//like this
|
||||
var ts = through(write, end, {autoDestroy: false})
|
||||
//or like this
|
||||
var ts = through(write, end)
|
||||
ts.autoDestroy = false
|
||||
```
|
||||
|
||||
[package-url]: https://npmjs.org/package/@ljharb/through
|
||||
[npm-version-svg]: https://versionbadg.es/ljharb/through.svg
|
||||
[deps-svg]: https://david-dm.org/ljharb/through.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/through
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/through/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/through#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/@ljharb/through.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/@ljharb/through.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/@ljharb/through.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=@ljharb/through
|
||||
[codecov-image]: https://codecov.io/gh/ljharb/through/branch/main/graphs/badge.svg
|
||||
[codecov-url]: https://app.codecov.io/gh/ljharb/through/
|
||||
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/through
|
||||
[actions-url]: https://github.com/ljharb/through/actions
|
123
my-app/node_modules/@ljharb/through/index.js
generated
vendored
Executable file
123
my-app/node_modules/@ljharb/through/index.js
generated
vendored
Executable file
|
@ -0,0 +1,123 @@
|
|||
'use strict';
|
||||
|
||||
var Stream = require('stream').Stream;
|
||||
var callBind = require('call-bind');
|
||||
|
||||
/** @typedef {import('./through').ThroughStream} ThroughStream */
|
||||
|
||||
// create a readable writable stream.
|
||||
|
||||
/** @type {import('./through')} */
|
||||
function through(write, end, opts) {
|
||||
var writeBound = callBind(write || function (data) { this.queue(data); });
|
||||
var endBound = callBind(end || function () { this.queue(null); });
|
||||
|
||||
var ended = false;
|
||||
var destroyed = false;
|
||||
/** @type {unknown[]} */ var buffer = [];
|
||||
var _ended = false;
|
||||
// @ts-expect-error
|
||||
/** @type {ThroughStream} */ var stream = new Stream();
|
||||
stream.readable = true;
|
||||
stream.writable = true;
|
||||
stream.paused = false;
|
||||
|
||||
// stream.autoPause = !(opts && opts.autoPause === false)
|
||||
stream.autoDestroy = !(opts && opts.autoDestroy === false);
|
||||
|
||||
stream.write = function (data) {
|
||||
writeBound(this, data);
|
||||
return !stream.paused;
|
||||
};
|
||||
|
||||
function drain() {
|
||||
while (buffer.length && !stream.paused) {
|
||||
var data = buffer.shift();
|
||||
if (data === null) { return stream.emit('end'); }
|
||||
stream.emit('data', data);
|
||||
}
|
||||
}
|
||||
|
||||
stream.queue = function (data) {
|
||||
// console.error(ended)
|
||||
if (_ended) { return stream; }
|
||||
if (data === null) { _ended = true; }
|
||||
buffer.push(data);
|
||||
drain();
|
||||
return stream;
|
||||
};
|
||||
stream.push = stream.queue;
|
||||
|
||||
/*
|
||||
* this will be registered as the first 'end' listener
|
||||
* must call destroy next tick, to make sure we're after any
|
||||
* stream piped from here.
|
||||
* this is only a problem if end is not emitted synchronously.
|
||||
* a nicer way to do this is to make sure this is the last listener for 'end'
|
||||
*/
|
||||
|
||||
stream.on('end', function () {
|
||||
stream.readable = false;
|
||||
if (!stream.writable && stream.autoDestroy) {
|
||||
process.nextTick(function () {
|
||||
stream.destroy();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function _end() {
|
||||
stream.writable = false;
|
||||
endBound(stream);
|
||||
if (!stream.readable && stream.autoDestroy) { stream.destroy(); }
|
||||
}
|
||||
|
||||
stream.end = function (data) {
|
||||
if (ended) { return; }
|
||||
ended = true;
|
||||
if (arguments.length) { stream.write(data); }
|
||||
_end(); // will emit or queue
|
||||
return stream;
|
||||
};
|
||||
|
||||
stream.destroy = function () {
|
||||
if (destroyed) { return; }
|
||||
destroyed = true;
|
||||
ended = true;
|
||||
buffer.length = 0;
|
||||
stream.writable = false;
|
||||
stream.readable = false;
|
||||
stream.emit('close');
|
||||
return stream;
|
||||
};
|
||||
|
||||
stream.pause = function () {
|
||||
if (stream.paused) { return; }
|
||||
stream.paused = true;
|
||||
return stream;
|
||||
};
|
||||
|
||||
stream.resume = function () {
|
||||
if (stream.paused) {
|
||||
stream.paused = false;
|
||||
stream.emit('resume');
|
||||
}
|
||||
drain();
|
||||
/*
|
||||
* may have become paused again,
|
||||
* as drain emits 'data'.
|
||||
*/
|
||||
if (!stream.paused) { stream.emit('drain'); }
|
||||
return stream;
|
||||
};
|
||||
return stream;
|
||||
}
|
||||
|
||||
/*
|
||||
* through
|
||||
*
|
||||
* a stream that does nothing but re-emit the input.
|
||||
* useful for aggregating a series of changing but not ending streams into one stream)
|
||||
*/
|
||||
|
||||
module.exports = through;
|
||||
through.through = through;
|
75
my-app/node_modules/@ljharb/through/package.json
generated
vendored
Executable file
75
my-app/node_modules/@ljharb/through/package.json
generated
vendored
Executable file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"name": "@ljharb/through",
|
||||
"version": "2.3.12",
|
||||
"description": "simplified stream construction",
|
||||
"main": "index.js",
|
||||
"types": "./through.d.ts",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "npm run tsc",
|
||||
"tsc": "tsc -p .",
|
||||
"posttsc": "attw --pack",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@arethetypeswrong/cli": "^0.13.6",
|
||||
"@ljharb/eslint-config": "^21.1.0",
|
||||
"@types/call-bind": "^1.0.5",
|
||||
"aud": "^2.0.4",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"from": "^0.1.7",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.1",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"stream-spec": "^0.3.6",
|
||||
"tape": "^5.7.4",
|
||||
"typescript": "^5.4.0-dev.20240124"
|
||||
},
|
||||
"keywords": [
|
||||
"stream",
|
||||
"streams",
|
||||
"user-streams",
|
||||
"pipe"
|
||||
],
|
||||
"author": "Dominic Tarr <dominic.tarr@gmail.com> (dominictarr.com)",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/through.git"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/through",
|
||||
"testling": {
|
||||
"files": "test/*.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true,
|
||||
"startingVersion": "2.3.9"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
29
my-app/node_modules/@ljharb/through/test/async.js
generated
vendored
Executable file
29
my-app/node_modules/@ljharb/through/test/async.js
generated
vendored
Executable file
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
var from = require('from');
|
||||
var through = require('../');
|
||||
|
||||
var tape = require('tape');
|
||||
|
||||
tape('simple async example', function (t) {
|
||||
var expected = [1, 2, 3, 4, 5];
|
||||
var actual = [];
|
||||
from(expected)
|
||||
.pipe(through(function (data) {
|
||||
this.pause();
|
||||
|
||||
setTimeout(function () {
|
||||
console.log('pushing data', data);
|
||||
this.push(data);
|
||||
this.resume();
|
||||
}.bind(this), 300);
|
||||
})).pipe(through(function (data) {
|
||||
console.log('pushing data second time', data);
|
||||
this.push(data);
|
||||
})).on('data', function (d) {
|
||||
actual.push(d);
|
||||
}).on('end', function () {
|
||||
t.deepEqual(actual, expected);
|
||||
t.end();
|
||||
});
|
||||
});
|
33
my-app/node_modules/@ljharb/through/test/auto-destroy.js
generated
vendored
Executable file
33
my-app/node_modules/@ljharb/through/test/auto-destroy.js
generated
vendored
Executable file
|
@ -0,0 +1,33 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var through = require('../');
|
||||
|
||||
// must emit end before close.
|
||||
|
||||
test('end before close', function (assert) {
|
||||
var ts = through();
|
||||
ts.autoDestroy = false;
|
||||
var ended = false;
|
||||
var closed = false;
|
||||
|
||||
ts.on('end', function () {
|
||||
assert.ok(!closed);
|
||||
ended = true;
|
||||
});
|
||||
ts.on('close', function () {
|
||||
assert.ok(ended);
|
||||
closed = true;
|
||||
});
|
||||
|
||||
ts.write(1);
|
||||
ts.write(2);
|
||||
ts.write(3);
|
||||
ts.end();
|
||||
assert.ok(ended);
|
||||
assert.notOk(closed);
|
||||
ts.destroy();
|
||||
assert.ok(closed);
|
||||
assert.end();
|
||||
});
|
||||
|
70
my-app/node_modules/@ljharb/through/test/buffering.js
generated
vendored
Executable file
70
my-app/node_modules/@ljharb/through/test/buffering.js
generated
vendored
Executable file
|
@ -0,0 +1,70 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var through = require('../');
|
||||
|
||||
// must emit end before close.
|
||||
|
||||
test('buffering', function (assert) {
|
||||
var ts = through(function (data) {
|
||||
this.queue(data);
|
||||
}, function () {
|
||||
this.queue(null);
|
||||
});
|
||||
|
||||
var ended = false;
|
||||
var actual = [];
|
||||
|
||||
ts.on('data', actual.push.bind(actual));
|
||||
ts.on('end', function () {
|
||||
ended = true;
|
||||
});
|
||||
|
||||
ts.write(1);
|
||||
ts.write(2);
|
||||
ts.write(3);
|
||||
assert.deepEqual(actual, [1, 2, 3]);
|
||||
ts.pause();
|
||||
ts.write(4);
|
||||
ts.write(5);
|
||||
ts.write(6);
|
||||
assert.deepEqual(actual, [1, 2, 3]);
|
||||
ts.resume();
|
||||
assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]);
|
||||
ts.pause();
|
||||
ts.end();
|
||||
assert.ok(!ended);
|
||||
ts.resume();
|
||||
assert.ok(ended);
|
||||
assert.end();
|
||||
});
|
||||
|
||||
test('buffering has data in queue, when ends', function (assert) {
|
||||
// If stream ends while paused with data in the queue, stream should still emit end after all data is written on resume.
|
||||
|
||||
var ts = through(function (data) {
|
||||
this.queue(data);
|
||||
}, function () {
|
||||
this.queue(null);
|
||||
});
|
||||
|
||||
var ended = false;
|
||||
var actual = [];
|
||||
|
||||
ts.on('data', actual.push.bind(actual));
|
||||
ts.on('end', function () {
|
||||
ended = true;
|
||||
});
|
||||
|
||||
ts.pause();
|
||||
ts.write(1);
|
||||
ts.write(2);
|
||||
ts.write(3);
|
||||
ts.end();
|
||||
assert.deepEqual(actual, [], 'no data written yet, still paused');
|
||||
assert.ok(!ended, 'end not emitted yet, still paused');
|
||||
ts.resume();
|
||||
assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered');
|
||||
assert.ok(ended, 'end should be emitted once all data was delivered');
|
||||
assert.end();
|
||||
});
|
47
my-app/node_modules/@ljharb/through/test/end.js
generated
vendored
Executable file
47
my-app/node_modules/@ljharb/through/test/end.js
generated
vendored
Executable file
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var through = require('../');
|
||||
|
||||
// must emit end before close.
|
||||
|
||||
test('end before close', function (assert) {
|
||||
var ts = through();
|
||||
var ended = false;
|
||||
var closed = false;
|
||||
|
||||
ts.on('end', function () {
|
||||
assert.ok(!closed);
|
||||
ended = true;
|
||||
});
|
||||
ts.on('close', function () {
|
||||
assert.ok(ended);
|
||||
closed = true;
|
||||
});
|
||||
|
||||
ts.write(1);
|
||||
ts.write(2);
|
||||
ts.write(3);
|
||||
ts.end();
|
||||
assert.ok(ended);
|
||||
assert.ok(closed);
|
||||
assert.end();
|
||||
});
|
||||
|
||||
test('end only once', function (t) {
|
||||
var ts = through();
|
||||
var ended = false;
|
||||
|
||||
ts.on('end', function () {
|
||||
t.equal(ended, false);
|
||||
ended = true;
|
||||
});
|
||||
|
||||
ts.queue(null);
|
||||
ts.queue(null);
|
||||
ts.queue(null);
|
||||
|
||||
ts.resume();
|
||||
|
||||
t.end();
|
||||
});
|
129
my-app/node_modules/@ljharb/through/test/index.js
generated
vendored
Executable file
129
my-app/node_modules/@ljharb/through/test/index.js
generated
vendored
Executable file
|
@ -0,0 +1,129 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var spec = require('stream-spec');
|
||||
var through = require('../');
|
||||
|
||||
/*
|
||||
*I'm using these two functions, and not streams and pipe
|
||||
*so there is less to break. if this test fails it must be
|
||||
*the implementation of _through_
|
||||
*/
|
||||
|
||||
function write(array, stream) {
|
||||
array = array.slice();
|
||||
function next() {
|
||||
while (array.length) { if (stream.write(array.shift()) === false) { return stream.once('drain', next); } }
|
||||
|
||||
stream.end();
|
||||
}
|
||||
|
||||
next();
|
||||
}
|
||||
|
||||
function read(stream, callback) {
|
||||
var actual = [];
|
||||
stream.on('data', function (data) {
|
||||
actual.push(data);
|
||||
});
|
||||
stream.once('end', function () {
|
||||
callback(null, actual);
|
||||
});
|
||||
stream.once('error', function (err) {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
|
||||
test('simple defaults', function (assert) {
|
||||
var l = 1000;
|
||||
var expected = [];
|
||||
|
||||
while (l--) { expected.push(l * Math.random()); }
|
||||
|
||||
var t = through();
|
||||
var s = spec(t).through().pausable();
|
||||
|
||||
read(t, function (err, actual) {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual(actual, expected);
|
||||
assert.end();
|
||||
});
|
||||
|
||||
t.on('close', s.validate);
|
||||
|
||||
write(expected, t);
|
||||
});
|
||||
|
||||
test('simple functions', function (assert) {
|
||||
var l = 1000;
|
||||
var expected = [];
|
||||
|
||||
while (l--) { expected.push(l * Math.random()); }
|
||||
|
||||
var t = through(function (data) {
|
||||
this.emit('data', data * 2);
|
||||
});
|
||||
var s = spec(t).through().pausable();
|
||||
|
||||
read(t, function (err, actual) {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual(actual, expected.map(function (data) {
|
||||
return data * 2;
|
||||
}));
|
||||
assert.end();
|
||||
});
|
||||
|
||||
t.on('close', s.validate);
|
||||
|
||||
write(expected, t);
|
||||
});
|
||||
|
||||
test('pauses', function (assert) {
|
||||
|
||||
var l = 1000;
|
||||
var expected = [];
|
||||
|
||||
while (l--) { expected.push(l); } // Math.random())
|
||||
|
||||
var t = through();
|
||||
|
||||
var s = spec(t)
|
||||
.through()
|
||||
.pausable();
|
||||
|
||||
t.on('data', function () {
|
||||
if (Math.random() > 0.1) { return; }
|
||||
t.pause();
|
||||
process.nextTick(function () {
|
||||
t.resume();
|
||||
});
|
||||
});
|
||||
|
||||
read(t, function (err, actual) {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual(actual, expected);
|
||||
});
|
||||
|
||||
t.on('close', function () {
|
||||
s.validate();
|
||||
assert.end();
|
||||
});
|
||||
|
||||
write(expected, t);
|
||||
});
|
||||
|
||||
test('does not soft-end on `undefined`', function (assert) {
|
||||
var stream = through();
|
||||
var count = 0;
|
||||
|
||||
stream.on('data', function () {
|
||||
count += 1;
|
||||
});
|
||||
|
||||
stream.write(undefined);
|
||||
stream.write(undefined);
|
||||
|
||||
assert.equal(count, 2);
|
||||
|
||||
assert.end();
|
||||
});
|
24
my-app/node_modules/@ljharb/through/through.d.ts
generated
vendored
Executable file
24
my-app/node_modules/@ljharb/through/through.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,24 @@
|
|||
/// <reference types="node" />
|
||||
|
||||
import stream from 'stream';
|
||||
|
||||
export interface ThroughStream extends stream.Transform {
|
||||
autoDestroy: boolean;
|
||||
paused: boolean;
|
||||
readable: boolean;
|
||||
writable: boolean;
|
||||
destroy: () => ThroughStream | undefined;
|
||||
end: (data: unknown) => ThroughStream | undefined;
|
||||
pause: () => ThroughStream | undefined;
|
||||
push: (chunk: unknown) => ThroughStream;
|
||||
queue: (chunk: unknown) => ThroughStream;
|
||||
resume: () => ThroughStream;
|
||||
}
|
||||
|
||||
declare function through(
|
||||
write?: (data: unknown) => void,
|
||||
end?: () => void,
|
||||
opts?: { autoDestroy?: boolean },
|
||||
): ThroughStream
|
||||
|
||||
export = through;
|
106
my-app/node_modules/@ljharb/through/tsconfig.json
generated
vendored
Executable file
106
my-app/node_modules/@ljharb/through/tsconfig.json
generated
vendored
Executable file
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
||||
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
|
||||
/* Modules */
|
||||
"module": "commonjs", /* Specify what module code is generated. */
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files */
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
||||
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
"noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
|
||||
/* Interop Constraints */
|
||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true, /* Enable all strict type-checking options. */
|
||||
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
||||
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
||||
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
||||
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
},
|
||||
"exclude": [
|
||||
"coverage/**",
|
||||
"example/**",
|
||||
"test/**/*"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue