Skip to content

Commit 19e1bc1

Browse files
author
Justin Frost
committed
chore(release): 1.0.13
1 parent 5b9a3a1 commit 19e1bc1

File tree

9 files changed

+258
-141
lines changed

9 files changed

+258
-141
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.0.13](https://github.com/monadicarts/lazy-streams/compare/v1.0.12...v1.0.13) (2024-11-12)
6+
57
### [1.0.12](https://github.com/monadicarts/lazy-streams/compare/v1.0.11...v1.0.12) (2024-11-12)
68

79
### [1.0.11](https://github.com/monadicarts/lazy-streams/compare/v1.0.10...v1.0.11) (2024-11-12)

README.md

Lines changed: 64 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# LazyStreams
22

3-
Welcome to **lazy-streams**, an elegant and modular TypeScript library. Developed by [Monadica](http://monadica.com).
3+
Welcome to **@monadica/lazy-streams**, an elegant and modular TypeScript library. Developed by [Monadica](http://monadica.com).
44

55
---
66

77
## Table of Contents
88

9-
- [Features](#features)
10-
- [Getting Started](#getting-started)
11-
- [Project Structure](#project-structure)
12-
- [Usage](#usage)
13-
- [Scripts](#scripts)
14-
- [Configuration](#configuration)
15-
- [Contributing](#contributing)
16-
- [License](#license)
9+
- [LazyStreams](#lazystreams)
10+
- [Table of Contents](#table-of-contents)
11+
- [Features](#features)
12+
- [Installation](#installation)
13+
- [Getting Started](#getting-started)
14+
- [Project Structure](#project-structure)
15+
- [Usage](#usage)
16+
- [Scripts](#scripts)
17+
- [Configuration](#configuration)
18+
- [Contributing](#contributing)
19+
- [License](#license)
20+
- [Contact](#contact)
1721

1822
---
1923

@@ -28,11 +32,19 @@ Welcome to **lazy-streams**, an elegant and modular TypeScript library. Develope
2832

2933
---
3034

35+
## Installation
36+
37+
To install the latest version of `@monadica/lazy-streams` from npm, use the following command:
38+
39+
```bash
40+
npm install @monadica/lazy-streams
41+
```
42+
3143
## Getting Started
3244

33-
To use this template for your next TypeScript npm package, follow these steps:
45+
To use or modify this library, follow these steps:
3446

35-
### 1. Clone the Repository
47+
1. Clone the Repository
3648

3749
Clone this repository to your local machine and navigate to the project directory.
3850

@@ -53,7 +65,7 @@ npm install
5365

5466
You’re now ready to start building your own TypeScript npm package!
5567

56-
Project Structure
68+
## Project Structure
5769

5870
```bash
5971
lazy-streams/
@@ -91,63 +103,69 @@ lazy-streams/
91103
└── typedoc.json # TypeDoc configuration file for generating documentation based on TSDoc comments
92104
```
93105

94-
Usage
106+
## Usage
95107

96-
After setting up the template and customizing it for your project, you can start adding your TypeScript code in the src/ directory.
97-
98-
Export your public API in src/index.ts, and this will serve as the entry point for your npm package. Here’s an example of a basic function and class you can add:
108+
Here’s a short example of how to use the `@monadica/lazy-streams` library to create a lazy stream, apply transformations, and retrieve results:
99109

100110
```typescript
101-
// src/index.ts
102-
export const greet = (name: string): string => `Hello, ${name}!`;
103-
104-
export class Greeter {
105-
constructor(public greeting: string) {}
106-
greet(name: string): string {
107-
return `${this.greeting}, ${name}!`;
108-
}
109-
}
111+
import { LazyStream } from "@monadica/lazy-streams";
112+
113+
// Create a lazy stream from an array
114+
const stream = LazyStream.from([1, 2, 3, 4, 5]);
115+
116+
// Apply transformations: multiply each element by 2 and filter even results
117+
const transformedStream = stream.map((x) => x * 2).filter((x) => x % 2 === 0);
118+
119+
// Take the first 3 elements of the transformed stream and convert to array
120+
const result = transformedStream.take(3).toArray();
121+
122+
console.log(result); // Output: [2, 4, 6]
110123
```
111124

112-
Compile and publish your package when ready, following the Scripts section below.
125+
This example demonstrates:
126+
• Creating a lazy stream from an array
127+
• Using map to transform values
128+
• Using filter to filter out certain values
129+
• Using take to limit the results
130+
• Converting the final stream to an array using toArray
113131

114-
Scripts
132+
## Scripts
115133

116134
A set of npm scripts are preconfigured to streamline development and publishing:
117-
• npm run build: Compiles TypeScript to JavaScript in multiple module formats (ESM, CommonJS, UMD, AMD).
118-
• npm test: Runs Jest tests.
119-
• npm run lint: Checks code for linting errors using ESLint.
120-
• npm run format: Formats code with Prettier.
121-
• npm run docs: Generates documentation with TypeDoc.
122-
• npm run release: Bumps version and updates changelog based on commit messages using standard-version.
123-
• npm publish: Publishes the package to npm (run after npm run release).
135+
`npm run build`: Compiles TypeScript to JavaScript in multiple module formats (ESM, CommonJS, UMD, AMD).
136+
`npm test`: Runs Jest tests.
137+
`npm run lint`: Checks code for linting errors using ESLint.
138+
`npm run format`: Formats code with Prettier.
139+
`npm run docs`: Generates documentation with TypeDoc.
140+
`npm run release`: Bumps version and updates changelog based on commit messages using standard-version.
141+
`npm publish`: Publishes the package to npm (run after npm run release).
124142

125-
Configuration
143+
## Configuration
126144

127145
This template includes configuration files for various tools, such as:
128-
• TypeScript (tsconfig.json): Configures compiler options and output.
129-
• ESLint (.eslintrc.js): Configures linting rules for code consistency.
130-
• Prettier (.prettierrc): Configures formatting rules for consistent style.
131-
• Jest (jest.config.js): Configures Jest for unit testing.
132-
• TypeDoc (typedoc.json): Configures TypeDoc for documentation generation.
146+
• TypeScript (`tsconfig.json`): Configures compiler options and output.
147+
• ESLint (`eslint.config.cjs`): Configures linting rules for code consistency.
148+
• Prettier (`.prettierrc`): Configures formatting rules for consistent style.
149+
• Jest (`jest.config.cjs`): Configures Jest for unit testing.
150+
• TypeDoc (`typedoc.json`): Configures TypeDoc for documentation generation.
133151

134-
Contributing
152+
## Contributing
135153

136-
We welcome contributions! To contribute: 1. Fork the repository and create a new branch (git checkout -b feature/YourFeature). 2. Make your changes and commit them (git commit -m "Add feature"). 3. Push to the branch (git push origin feature/YourFeature). 4. Open a Pull Request.
154+
We welcome contributions! To contribute: 1. Fork the repository and create a new branch (`git checkout -b feature/YourFeature`). 2. Make your changes and commit them (`git commit -m "Add feature"`). 3. Push to the branch (`git push origin feature/YourFeature`). 4. Open a Pull Request.
137155

138156
If you have any questions or suggestions, please reach out to us at monadicarts@gmail.com.
139157

140-
License
158+
## License
141159

142160
This project is licensed under the MIT License.
143161

144162
Developed and maintained by Monadica.
145163

146-
Thank you for using `template-ts-npm`! We hope this template helps you create amazing TypeScript npm packages with ease.
164+
Thank you for using `@monadica/lazy-streams`!
147165

148-
Contact
166+
## Contact
149167

150-
• GitHub: https://github.com/monadicarts
168+
• GitHub: github.com/monadicarts
151169
• Website: monadica.com
152170
• Email: monadicarts@gmail.com
153171

docs/assets/highlight.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
--dark-hl-3: #6a9955;
1010
--light-hl-4: #af00db;
1111
--dark-hl-4: #c586c0;
12-
--light-hl-5: #0000ff;
13-
--dark-hl-5: #569cd6;
14-
--light-hl-6: #001080;
15-
--dark-hl-6: #9cdcfe;
16-
--light-hl-7: #267f99;
17-
--dark-hl-7: #4ec9b0;
18-
--light-hl-8: #000000ff;
19-
--dark-hl-8: #d4d4d4;
12+
--light-hl-5: #001080;
13+
--dark-hl-5: #9cdcfe;
14+
--light-hl-6: #0000ff;
15+
--dark-hl-6: #569cd6;
16+
--light-hl-7: #0070c1;
17+
--dark-hl-7: #4fc1ff;
18+
--light-hl-8: #098658;
19+
--dark-hl-8: #b5cea8;
2020
--light-code-background: #ffffff;
2121
--dark-code-background: #1e1e1e;
2222
}

docs/classes/LazyStream.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h4>Implements</h4>
105105
<li>
106106
Defined in
107107
<a
108-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L15"
108+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L15"
109109
>LazyStream.ts:15</a
110110
>
111111
</li>
@@ -331,7 +331,7 @@ <h4 class="tsd-returns-title">
331331
<li>
332332
Defined in
333333
<a
334-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L18"
334+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L18"
335335
>LazyStream.ts:18</a
336336
>
337337
</li>
@@ -482,7 +482,7 @@ <h4 class="tsd-returns-title">
482482
<li>
483483
Defined in
484484
<a
485-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L42"
485+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L42"
486486
>LazyStream.ts:42</a
487487
>
488488
</li>
@@ -645,7 +645,7 @@ <h4 class="tsd-returns-title">
645645
<li>
646646
Defined in
647647
<a
648-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L32"
648+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L32"
649649
>LazyStream.ts:32</a
650650
>
651651
</li>
@@ -728,7 +728,7 @@ <h4 class="tsd-returns-title">
728728
<li>
729729
Defined in
730730
<a
731-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L54"
731+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L54"
732732
>LazyStream.ts:54</a
733733
>
734734
</li>
@@ -794,7 +794,7 @@ <h4 class="tsd-returns-title">
794794
<li>
795795
Defined in
796796
<a
797-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L69"
797+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L69"
798798
>LazyStream.ts:69</a
799799
>
800800
</li>
@@ -899,7 +899,7 @@ <h4 class="tsd-returns-title">
899899
<li>
900900
Defined in
901901
<a
902-
href="https://github.com/monadicarts/lazy-streams/blob/065800ecbd6d9931a3218520a9b814ac26f193c3/src/LazyStream.ts#L23"
902+
href="https://github.com/monadicarts/lazy-streams/blob/161d4e74cc88fa35ba042b85b5d09bbf70b174cd/src/LazyStream.ts#L23"
903903
>LazyStream.ts:23</a
904904
>
905905
</li>

0 commit comments

Comments
 (0)