Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 26, 2022
1 parent fad779c commit 59b5c24
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
Convert a value to a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
@param value - Value to convert to a stream.
@param value - The value to convert to a stream.
@example
```
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export default function toReadableStream(value) {
start(controller) {
controller.enqueue(value);
controller.close();
}
},
});
}
2 changes: 1 addition & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Buffer} from 'node:buffer';
import toReadableStream from './index.js';
import {expectType} from 'tsd';
import toReadableStream from './index.js';

expectType<ReadableStream<string>>(toReadableStream('🦄🌈'));
expectType<ReadableStream<Buffer>>(toReadableStream(Buffer.from('🦄🌈')));
Expand Down
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"engines": {
"node": ">=18"
},
Expand All @@ -37,17 +40,12 @@
"pull"
],
"devDependencies": {
"ava": "^3.15.0",
"ava": "^5.0.1",
"get-stream": "^6.0.1",
"tsd": "^0.14.0",
"xo": "^0.39.1"
"tsd": "^0.24.1",
"xo": "^0.52.4"
},
"xo": {
"env": "browser"
},
"tsd": {
"compilerOptions": {
"lib": ["dom"]
}
}
}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Returns a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/Re

#### value

Value to convert to a stream.
The value to convert to a stream.

## Related

Expand Down

0 comments on commit 59b5c24

Please # to comment.