Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular2-pipes

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-pipes - npm Package Compare versions

Comparing version 0.4.1 to 0.4.5

src/app/pipes/array/index.ts

2

index.d.ts

@@ -1,1 +0,1 @@

export * from './bin/app/pipes.module';
export * from './src/app/pipes.module';

@@ -1,4 +0,4 @@

function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require('./bin/app/pipes.module'));
// function __export(m) {
// for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
// }
// __export(require('./bin/app/pipes.module'));
{
"name": "angular2-pipes",
"version": "0.4.1",
"version": "0.4.5",
"author": "Dan Revah",

@@ -5,0 +5,0 @@ "description": "Useful angular2 pipes",

@@ -36,2 +36,3 @@ # Angular2 Pipes

- [some](#some)
- [sample](#sample)
- [Math](#Math)

@@ -99,3 +100,3 @@ - [min](#min)

Api: `string | repeat: times: [separator|optional]`
API: `string | repeat: times: [separator|optional]`

@@ -110,3 +111,3 @@ ```html

Api: `string | scan: [ARRAY]`
API: `string | scan: [ARRAY]`

@@ -122,3 +123,3 @@ ```html

Api: `string | shorten: length: [suffix|optional]: [wordBreak boolean|optional]`
API: `string | shorten: length: [suffix|optional]: [wordBreak boolean|optional]`

@@ -133,3 +134,3 @@ ```html

Api: `string | stripTags: [ARRAY]`
API: `string | stripTags: [ARRAY]`

@@ -161,3 +162,3 @@ ```html

Api: `string | trim: [characters|optional]`
API: `string | trim: [characters|optional]`

@@ -173,3 +174,3 @@ ```html

Api: `string | ltrim: [characters|optional]`
API: `string | ltrim: [characters|optional]`

@@ -185,3 +186,3 @@ ```html

Api: `string | rtrim: [characters|optional]`
API: `string | rtrim: [characters|optional]`

@@ -197,3 +198,3 @@ ```html

Api: `string | reverse`
API: `string | reverse`

@@ -211,3 +212,3 @@ ```html

Api: `array | diff: [ARRAY]: [ARRAY]: ... : [ARRAY]`
API: `array | diff: [ARRAY]: [ARRAY]: ... : [ARRAY]`

@@ -226,3 +227,3 @@ ```typescript

Api: `array | flatten: [shallow|optional]`
API: `array | flatten: [shallow|optional]`

@@ -242,3 +243,3 @@ ```typescript

Api: `array | initial: n`
API: `array | initial: n`

@@ -257,3 +258,3 @@ ```typescript

Api: `array | tail: n`
API: `array | tail: n`

@@ -272,3 +273,3 @@ ```typescript

Api: `array | intersection: [ARRAY]: [ARRAY]: ... : [ARRAY]`
API: `array | intersection: [ARRAY]: [ARRAY]: ... : [ARRAY]`

@@ -287,3 +288,3 @@ ```typescript

Api: `array | reverse`
API: `array | reverse`

@@ -302,3 +303,3 @@ ```typescript

Api: `array | truthify`
API: `array | truthify`

@@ -317,3 +318,3 @@ ```typescript

Api: `array | union: [ARRAY]`
API: `array | union: [ARRAY]`

@@ -332,3 +333,3 @@ ```typescript

Api: `array | unique`
API: `array | unique`

@@ -347,3 +348,3 @@ ```typescript

Api: `array | without: [ARRAY]`
API: `array | without: [ARRAY]`

@@ -362,3 +363,3 @@ ```typescript

Api: `array | pluck: propertyName`
API: `array | pluck: propertyName`

@@ -397,3 +398,3 @@ ```typescript

Api: `array | shuffle`
API: `array | shuffle`

@@ -410,5 +411,5 @@ ```typescript

Returns boolean value if every elements of the array fits the predicate
Returns true if every elements of the array fits the predicate otherwise false
Api: `array | every: predicate`
API: `array | every: predicate`

@@ -432,5 +433,5 @@ ```typescript

Returns boolean value if some elements of the array fits the predicate
Returns true if some elements of the array fits the predicate otherwise false
Api: `array | some: predicate`
API: `array | some: predicate`

@@ -452,2 +453,13 @@ ```typescript

### sample
Returns sample items randomly from array
API: `array | sample: [amount | default = 1]`
```html
<p>{{ [1, 2, 3, 4] | sample }}</p> <-- Output: "[2]" -->
<p>{{ [1, 2, 3, 4] | sample: 2 }}</p> <-- Output: "[4, 3]" -->
```
## Math

@@ -459,3 +471,3 @@

Api: `array | min`
API: `array | min`

@@ -470,3 +482,3 @@ ```html

Api: `array | max`
API: `array | max`

@@ -481,3 +493,3 @@ ```html

Api: `array | sum`
API: `array | sum`

@@ -492,3 +504,3 @@ ```html

Api: `number | percentage: [total | default = 100]: [floor | default = false]`
API: `number | percentage: [total | default = 100]: [floor | default = false]`

@@ -505,3 +517,3 @@ ```html

Api: `number | ceil: [precision | default = 0]`
API: `number | ceil: [precision | default = 0]`

@@ -517,3 +529,3 @@ ```html

Api: `number | floor: [precision | default = 0]`
API: `number | floor: [precision | default = 0]`

@@ -529,3 +541,3 @@ ```html

Api: `number | round: [precision | default = 0]`
API: `number | round: [precision | default = 0]`

@@ -542,3 +554,3 @@ ```html

Api: `number | sqrt`
API: `number | sqrt`

@@ -553,3 +565,3 @@ ```html

Api: `number | pow: [power | default = 2]`
API: `number | pow: [power | default = 2]`

@@ -565,3 +577,3 @@ ```html

Api: `number | degrees`
API: `number | degrees`

@@ -576,3 +588,3 @@ ```html

Api: `number | radians`
API: `number | radians`

@@ -587,3 +599,3 @@ ```html

Api: `number | bytes`
API: `number | bytes`

@@ -601,3 +613,3 @@ ```html

Api: `any | isNull`
API: `any | isNull`

@@ -611,3 +623,3 @@ ```html

Api: `any | isDefined`
API: `any | isDefined`

@@ -621,3 +633,3 @@ ```html

Api: `any | isUndefined`
API: `any | isUndefined`

@@ -632,3 +644,3 @@ ```html

Api: `any | isString`
API: `any | isString`

@@ -642,3 +654,3 @@ ```html

Api: `any | isNumber`
API: `any | isNumber`

@@ -657,3 +669,3 @@ ```typescript

Api: `any | isArray`
API: `any | isArray`

@@ -672,3 +684,3 @@ ```typescript

Api: `any | isObject`
API: `any | isObject`

@@ -687,3 +699,3 @@ ```typescript

Api: `number | isGreaterThan: otherNumber`
API: `number | isGreaterThan: otherNumber`

@@ -698,3 +710,3 @@ ```html

Api: `number | isGreaterEqualThan: otherNumber`
API: `number | isGreaterEqualThan: otherNumber`

@@ -709,3 +721,3 @@ ```html

Api: `number | isLessThan: otherNumber`
API: `number | isLessThan: otherNumber`

@@ -720,3 +732,3 @@ ```html

Api: `number | isLessEqualThan: otherNumber`
API: `number | isLessEqualThan: otherNumber`

@@ -731,3 +743,3 @@ ```html

Api: `number | isEqualTo: otherNumber`
API: `number | isEqualTo: otherNumber`

@@ -743,3 +755,3 @@ ```html

Api: `number | isNotEqualTo: otherNumber`
API: `number | isNotEqualTo: otherNumber`

@@ -755,3 +767,3 @@ ```html

Api: `number | isIdenticalTo: otherNumber`
API: `number | isIdenticalTo: otherNumber`

@@ -767,3 +779,3 @@ ```html

Api: `number | isNotIdenticalTo: otherNumber`
API: `number | isNotIdenticalTo: otherNumber`

@@ -770,0 +782,0 @@ ```html

import {NgModule} from '@angular/core';
import {ARRAY_PIPES} from "./pipes/array/array";
import {STRING_PIPES} from "./pipes/string/string";
import {MATH_PIPES} from "./pipes/math/math";
import {BOOLEAN_PIPES} from "./pipes/boolean/boolean";
import {ARRAY_PIPES} from './pipes/array';
import {STRING_PIPES} from './pipes/string';
import {MATH_PIPES} from './pipes/math';
import {BOOLEAN_PIPES} from './pipes/boolean';
@NgModule({

@@ -14,1 +13,6 @@ declarations: [...STRING_PIPES, ...ARRAY_PIPES, ...MATH_PIPES, ...BOOLEAN_PIPES],

export class NgPipesModule {}
export * from './pipes/array';
export * from './pipes/string';
export * from './pipes/math';
export * from './pipes/boolean';

@@ -15,3 +15,3 @@ import {PipeTransform, Pipe, Injectable} from '@angular/core';

let shuffled = Array.from(arr);
let shuffled = [...arr];
for (let i = 0, n = arr.length - 1, l = n - 1; i < l; ++i) {

@@ -18,0 +18,0 @@ const j = Math.floor(Math.random() * (n - i + 1)) + i;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc