# different-pipes

> A different pipes module for Angular

Latest version **0.0.6** (published 2017-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install different-pipes
pnpm add different-pipes
yarn add different-pipes
bun add different-pipes
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-11-26 |
| First published | 2017-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Toni Mora |
| Maintainers | tonimora |
| Keywords | angular, angular2, angular 2, angular4, angular 4, pipe, pipes |

## Links

- npm: https://www.npmjs.com/package/different-pipes
- npm.io page: https://npm.io/package/different-pipes

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2017-11-26

## README

### Different pipes for Angular 
This project is a collection of pipes to be used in Angular projects

### List of pipes available and parameters (required and optional)
```typescript
. SortArrayByOneNumeralPropertyPipe:
    - value: Array<any>;
    - propertyName: string;

. SortArrayByTwoNumeralPropertyPipe
    - value: Array<any>;
    - firstPropertyName: string;
    - secondPropertyName: string;
    - limit?: number;
```    

### 1- Import the MODULE
```typescript
import { SortArrayByOneNumeralPropertyModule } from 'different-pipes'; 

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SortArrayByOneNumeralPropertyPipeModule,
    SortArrayByTwoNumeralPropertyPipeModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
```
### 2- Example of variables in the CONTROLLER
```typescript
heroes: Array<any> = [
    {name: 'Jack', order: 2},
    {name: 'Thon', order: 6},
    {name: 'Eduard', order: 1},
    {name: 'Jhon', order: 5},
    {name: 'Rita', order: 4},
    {name: 'Peter', order: 3},
  ];

priority: Array<any> = [
    {name: 'House', order: 1, value: 101},
    {name: 'Car', order: 2, value: 101},
    {name: 'Hollidays', order: 2, value: 100},
    {name: 'Beer', order: 1, value: 104},
    {name: 'Water', order: 1, value: 103},
    {name: 'Horse', order: 3, value: 100},
  ];
```

### 3- Example of use in the HTML
```html
<div>
  <p>sortArrayByOneNumeralPropertyPipe: sort by property "order":</p>
  <p *ngFor="let item of heroes | sortArrayByOneNumeralProperty: 'order'">{{item.name}}</p>
</div>

<div>
  <p>sortArrayByTwoNumeralPropertyPipe: sort by properties "order" & "value" with optional parameter limit to 3:</p>
  <p *ngFor="let item of priority | sortArrayByTwoNumeralProperty : 'order' : 'value' : 3">{{item.name}}</p>
</div>
```

---
_Source: https://npm.io/package/different-pipes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
