Skip to content

Remove need for tslib at runtime #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ The package is available on npm as [@shutterstock/p-map-iterable](https://www.np
## Importing

```typescript
import { IterableMapper, IterableQueueMapper, IterableQueueMapperSimple } from '@shutterstock/p-map-iterable';
import {
IterableMapper,
IterableQueueMapper,
IterableQueueMapperSimple } from '@shutterstock/p-map-iterable';
```

## API Documentation
Expand Down
3 changes: 2 additions & 1 deletion examples/iterable-queue-mapper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import { IterableQueueMapper } from '@shutterstock/p-map-iterable';
import AggregateError from 'aggregate-error';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const AggregateError = require('aggregate-error');
import { promisify } from 'util';
const sleep = promisify(setTimeout);

Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@shutterstock/p-map-iterable",
"version": "0.0.0",
"description": "Async iterable that maps an async iterable input with backpressure.",
"description": "Set of classes that allow you to call mappers with controlled concurrency on iterables or on queues",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"publishConfig": {
Expand All @@ -11,10 +11,15 @@
"keywords": [
"p-map",
"p-map-iterable",
"blocking-queue",
"iterable-queue",
"mapping",
"iterable",
"queue",
"async",
"promise",
"backpressure",
"back-pressure",
"flow-control",
"AsyncIterable",
"AsyncIterator"
],
Expand Down
3 changes: 2 additions & 1 deletion src/iterable-mapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// 2021-08-25 - Initially based on: https://raw.githubusercontent.com/sindresorhus/p-map/main/index.js
//
import AggregateError from 'aggregate-error';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const AggregateError = require('aggregate-error');
import { IterableQueue } from './iterable-queue';

/**
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"sourceMap": true,
"resolveJsonModule": true,

"importHelpers": true,
"importHelpers": false,
"noEmitHelpers": true,
"composite": true,
"target": "es2016",
"target": "es2018",
"module": "commonjs",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
Expand Down