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.13 to 0.4.14

bin/app/pipes/array/index.d.ts

4

bin/app/pipes.module.d.ts
export declare class NgPipesModule {
}
export * from './pipes/array';
export * from './pipes/string';
export * from './pipes/math';
export * from './pipes/boolean';

19

bin/app/pipes.module.js

@@ -11,7 +11,10 @@ "use strict";

};
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var core_1 = require('@angular/core');
var array_1 = require("./pipes/array/array");
var string_1 = require("./pipes/string/string");
var math_1 = require("./pipes/math/math");
var boolean_1 = require("./pipes/boolean/boolean");
var array_1 = require('./pipes/array');
var string_1 = require('./pipes/string');
var math_1 = require('./pipes/math');
var boolean_1 = require('./pipes/boolean');
var NgPipesModule = (function () {

@@ -22,5 +25,5 @@ function NgPipesModule() {

core_1.NgModule({
declarations: string_1.STRING_PIPES.concat(array_1.ARRAY_PIPES, math_1.MATH_PIPES, boolean_1.BOOLEAN_PIPES),
declarations: [],
imports: [],
exports: string_1.STRING_PIPES.concat(array_1.ARRAY_PIPES, math_1.MATH_PIPES, boolean_1.BOOLEAN_PIPES)
exports: [array_1.NgArrayPipesModule, string_1.NgStringPipesModule, math_1.NgMathPipesModule, boolean_1.NgBooleanPipesModule]
}),

@@ -32,3 +35,7 @@ __metadata('design:paramtypes', [])

exports.NgPipesModule = NgPipesModule;
__export(require('./pipes/array'));
__export(require('./pipes/string'));
__export(require('./pipes/math'));
__export(require('./pipes/boolean'));
//# sourceMappingURL=pipes.module.js.map
{
"name": "angular2-pipes",
"version": "0.4.13",
"version": "0.4.14",
"author": "Dan Revah",

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

@@ -70,25 +70,40 @@ # Angular2 Pipes

1. Use npm to install the package
```
$ npm install ng2-pipes --save
```
```terminal
$ npm install ng2-pipes --save
```
2. Add into your module `imports` the `NgPipesModule`
2. You could either add into your module `imports` the `NgPipesModule` in order to add all of the pipes, Or add a specific module such as `NgArrayPipesModule`, `NgStringPipesModule`, `NgMathPipesModule` or `NgBooleanPipesModule`.
```typescript
import {NgPipesModule} from 'ng2-pipes';
@NgModule({
// ...
imports: [
```typescript
import {NgPipesModule} from 'ng2-pipes';
@NgModule({
// ...
NgPipesModule
]
})
imports: [
// ...
NgPipesModule
]
})
```
```
3. Pipes are also injectable and can be used in Components / Services / etc..
```typescript
@Component({
// ..
providers: [ReversePipe]
})
export class AppComponent {
constructor(private reversePipe: ReversePipe) {
this.reversePipe.transform('foo'); // Returns: "oof"
}
// ..
}
```
## String

@@ -95,0 +110,0 @@

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 {NgArrayPipesModule} from './pipes/array';
import {NgStringPipesModule} from './pipes/string';
import {NgMathPipesModule} from './pipes/math';
import {NgBooleanPipesModule} from './pipes/boolean';
@NgModule({
declarations: [...STRING_PIPES, ...ARRAY_PIPES, ...MATH_PIPES, ...BOOLEAN_PIPES],
declarations: [],
imports: [],
exports: [...STRING_PIPES, ...ARRAY_PIPES, ...MATH_PIPES, ...BOOLEAN_PIPES]
exports: [NgArrayPipesModule, NgStringPipesModule, NgMathPipesModule, NgBooleanPipesModule]
})
export class NgPipesModule {}
export * from './pipes/array';
export * from './pipes/string';
export * from './pipes/math';
export * from './pipes/boolean';

Sorry, the diff of this file is not supported yet

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