Skip to content

Commit da5855b

Browse files
authored
Remove need for tslib at runtime (#6)
1 parent deb10d8 commit da5855b

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ The package is available on npm as [@shutterstock/p-map-iterable](https://www.np
3232
## Importing
3333

3434
```typescript
35-
import { IterableMapper, IterableQueueMapper, IterableQueueMapperSimple } from '@shutterstock/p-map-iterable';
35+
import {
36+
IterableMapper,
37+
IterableQueueMapper,
38+
IterableQueueMapperSimple } from '@shutterstock/p-map-iterable';
3639
```
3740

3841
## API Documentation

examples/iterable-queue-mapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable no-console */
22
import { IterableQueueMapper } from '@shutterstock/p-map-iterable';
3-
import AggregateError from 'aggregate-error';
3+
// eslint-disable-next-line @typescript-eslint/no-var-requires
4+
const AggregateError = require('aggregate-error');
45
import { promisify } from 'util';
56
const sleep = promisify(setTimeout);
67

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@shutterstock/p-map-iterable",
33
"version": "0.0.0",
4-
"description": "Async iterable that maps an async iterable input with backpressure.",
4+
"description": "Set of classes that allow you to call mappers with controlled concurrency on iterables or on queues",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",
77
"publishConfig": {
@@ -11,10 +11,15 @@
1111
"keywords": [
1212
"p-map",
1313
"p-map-iterable",
14+
"blocking-queue",
15+
"iterable-queue",
16+
"mapping",
1417
"iterable",
18+
"queue",
1519
"async",
1620
"promise",
17-
"backpressure",
21+
"back-pressure",
22+
"flow-control",
1823
"AsyncIterable",
1924
"AsyncIterator"
2025
],

src/iterable-mapper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
//
22
// 2021-08-25 - Initially based on: https://raw.githubusercontent.com/sindresorhus/p-map/main/index.js
33
//
4-
import AggregateError from 'aggregate-error';
4+
// eslint-disable-next-line @typescript-eslint/no-var-requires
5+
const AggregateError = require('aggregate-error');
56
import { IterableQueue } from './iterable-queue';
67

78
/**

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
"sourceMap": true,
1616
"resolveJsonModule": true,
1717

18-
"importHelpers": true,
18+
"importHelpers": false,
19+
"noEmitHelpers": true,
1920
"composite": true,
20-
"target": "es2016",
21+
"target": "es2018",
2122
"module": "commonjs",
2223
"esModuleInterop": true,
2324
"allowSyntheticDefaultImports": true,

0 commit comments

Comments
 (0)