Skip to content
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
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: [angular-package] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: angularpackage # 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: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
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: [
'https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29',
'https://donate.stripe.com/dR614hfDZcJE3wAcMM'
] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

*.ignore*
temp
200 changes: 200 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<a href="https://www.typescriptlang.org/">
<img
src="https://raw.githubusercontent.com/typescript-package/core/refs/heads/main/ts-package-barcode-logo-512.png"
width="20%"
title="@typescript-package/collection - A lightweight TypeScript library for data collection."
/>
</a>

## @typescript-package/collection

<!-- npm badge -->
[![npm version][typescript-package-npm-badge-svg]][typescript-package-npm-badge]
[![GitHub issues][typescript-package-badge-issues]][typescript-package-issues]
[![GitHub license][typescript-package-badge-license]][typescript-package-license]

A **lightweight** TypeScript package for data collection.

## Table of contents

- [Installation](#installation)
- [Api](#api)
- **Abstract**
- [`CollectionBase`](#collectionbase)
- [`CollectionCore`](#collectioncore)
- **Adapters**
- [`SetAdapter`](#setadapter)
- **Concrete**
- [`Collection`](#collection)
- [Contributing](#contributing)
- [Code of Conduct](code-of-conduct)
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing # character in the link. This should be [Code of Conduct](#code-of-conduct) to properly link to the section.

Suggested change
- [Code of Conduct](code-of-conduct)
- [Code of Conduct](#code-of-conduct)

Copilot uses AI. Check for mistakes.
- [Git](#git)
- [Commit](#commit)
- [Versioning](#versioning)
- [License](#license)

## Installation

```bash
npm install @typescript-package/collection --save-peer
```

## Api

```typescript
import {
// Abstract.
CollectionCore,
CollectionBase,
// Concrete.
Collection,
// Adapters.
SetAdapter
} from '@typescript-package/collection';
```

### Abstract

### `CollectionBase`

The base functionality abstraction for collections.

```typescript
import { CollectionBase } from '@typescript-package/collection';
```

[`CollectionBase`](https://github.com/typescript-package/hooks/blob/main/src/core/lib/collection.base.ts)
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect GitHub repository link. The URL points to typescript-package/hooks but should point to typescript-package/collection to match this repository.

Suggested change
[`CollectionBase`](https://github.com/typescript-package/hooks/blob/main/src/core/lib/collection.base.ts)
[`CollectionBase`](https://github.com/typescript-package/collection/blob/main/src/core/lib/collection.base.ts)

Copilot uses AI. Check for mistakes.

### `CollectionCore`

The core abstract class for `Type` collections of elements `Element` type.

```typescript
import { CollectionCore } from '@typescript-package/collection';
```

[`CollectionCore`](https://github.com/typescript-package/hooks/blob/main/src/core/lib/collection.core.ts)
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect GitHub repository link. The URL points to typescript-package/hooks but should point to typescript-package/collection to match this repository.

Copilot uses AI. Check for mistakes.

### Adapters

### `SetAdapter`

The Set collection adapter.

```typescript
import { SetAdapter } from '@typescript-package/collection';
```

[`SetAdapter`](https://github.com/typescript-package/hooks/blob/main/src/adapter/lib/set.adapter.ts)
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect GitHub repository link. The URL points to typescript-package/hooks but should point to typescript-package/collection to match this repository.

Copilot uses AI. Check for mistakes.

### Concrete

### `Collection`

The collection concrete class with adapter support.

```typescript
import { Collection, SetAdapter } from '@typescript-package/collection';

const collection = new Collection(SetAdapter, 1, 2, 3);

// Adds.
collection.add(27, 29, 31, 33);
// Deletes.
collection.delete(29, 31);

console.log(`size: `, collection.size); // Output: 5
```

[`Collection`](https://github.com/typescript-package/hooks/blob/main/src/lib/collection.ts)
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect GitHub repository link and wrong file name. The URL points to typescript-package/hooks but should point to typescript-package/collection. Additionally, the file is named collection.class.ts, not collection.ts.

Copilot uses AI. Check for mistakes.

## Contributing

Your contributions are valued! If you'd like to contribute, please feel free to submit a pull request. Help is always appreciated.

## Support

If you find this package useful and would like to support its and general development, you can contribute through one of the following payment methods. Your support helps maintain the packages and continue adding new.

Support via:

- [Stripe](https://donate.stripe.com/dR614hfDZcJE3wAcMM)
- [Revolut](https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29)
- [GitHub](https://github.com/sponsors/angular-package/sponsorships?sponsor=sciborrudnicki&tier_id=83618)
- [DonorBox](https://donorbox.org/become-a-sponsor-to-the-angular-package?default_interval=o)
- [Patreon](https://www.patreon.com/checkout/angularpackage?rid=0&fan_landing=true&view_as=public)

or via Trust Wallet

- [XLM](https://link.trustwallet.com/send?coin=148&address=GAFFFB7H3LG42O6JA63FJDRK4PP4JCNEOPHLGLLFH625X2KFYQ4UYVM4)
- [USDT (BEP20)](https://link.trustwallet.com/send?coin=20000714&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94&token_id=0x55d398326f99059fF775485246999027B3197955)
- [ETH](https://link.trustwallet.com/send?coin=60&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94)
- [BTC](https://link.trustwallet.com/send?coin=0&address=bc1qnf709336tfl57ta5mfkf4t9fndhx7agxvv9svn)
- [BNB](https://link.trustwallet.com/send?coin=20000714&address=0xA0c22A2bc7E37C1d5992dFDFFeD5E6f9298E1b94)

Thanks for your support!

## Code of Conduct

By participating in this project, you agree to follow **[Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)**.

## GIT

### Commit

Please follow the following commit message conventions:

- [AngularJS Git Commit Message Conventions][git-commit-angular]
- [Karma Git Commit Msg][git-commit-karma]
- [Conventional Commits][git-commit-conventional]

### Versioning

The package follows [Semantic Versioning 2.0.0][git-semver] for all releases. The versioning format is:

**Given a version number MAJOR.MINOR.PATCH, increment the:**

- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

**FAQ**
How should I deal with revisions in the 0.y.z initial development phase?

> The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.

How do I know when to release 1.0.0?

> If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.

## License

MIT © typescript-package ([license][typescript-package-license])

<!-- This package: typescript-package -->
<!-- GitHub: badges -->
[typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/collection
[isscript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/collection
Copy link

Copilot AI Dec 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in badge reference name: isscript-package-badge-forks should be typescript-package-badge-forks.

Suggested change
[isscript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/collection
[typescript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/collection

Copilot uses AI. Check for mistakes.
[typescript-package-badge-stars]: https://img.shields.io/github/stars/typescript-package/collection
[typescript-package-badge-license]: https://img.shields.io/github/license/typescript-package/collection
<!-- GitHub: badges links -->
[typescript-package-issues]: https://github.com/typescript-package/collection/issues
[typescript-package-forks]: https://github.com/typescript-package/collection/network
[typescript-package-license]: https://github.com/typescript-package/collection/blob/master/LICENSE
[typescript-package-stars]: https://github.com/typescript-package/collection/stargazers
<!-- This package -->

<!-- Package: typescript-package -->
<!-- npm -->
[typescript-package-npm-badge-svg]: https://badge.fury.io/js/@typescript-package%2Fcollection.svg
[typescript-package-npm-badge]: https://badge.fury.io/js/@typescript-package%2Fcollection

<!-- GIT -->
[git-semver]: http://semver.org/

<!-- GIT: commit -->
[git-commit-angular]: https://gist.github.com/stephenparish/9941e89d80e2bc58a153
[git-commit-karma]: http://karma-runner.github.io/0.10/dev/git-commit-msg.html
[git-commit-conventional]: https://www.conventionalcommits.org/en/v1.0.0/
8 changes: 8 additions & 0 deletions ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/collection",
"lib": {
"entryFile": "src/public-api.ts"
},
"keepLifecycleScripts": true
}
79 changes: 79 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@typescript-package/collection",
"version": "0.0.1",
"author": "wwwdev.io <dev@wwwdev.io>",
"description": "A lightweight TypeScript library for data collection.",
"license": "MIT",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
},
"peerDependencies": {
"@typedly/collection": "^1.1.0"
},
"scripts": {
"prepublishOnly": "npm run pkg && npm run clean",
"pkg": "npm pkg delete dependencies",
"clean": "npm pkg delete scripts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/typescript-package/collection.git"
},
"bugs": {
"url": "https://github.com/typescript-package/collection/issues"
},
"keywords": [
"@typescript-package",
"@typescript-package/collection",
"CollectionBase",
"CollectionCore"
],
"funding": [
{
"type": "stripe",
"url": "https://donate.stripe.com/dR614hfDZcJE3wAcMM"
},
{
"type": "individual",
"url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29"
}
],
"sideEffects": false
}
Loading