ngx-fi-lodash
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

NgxFiLodash

lodash as ngx-fi-lodash

Installation

  • npm i lodash --save
  • npm i @types/lodash --save-dev
  • npm i ngx-fi-lodash --save

How to use

In a module

import { NgModule } from "@angular/core";
import { NgxFiLodashModule } from "ngx-fi-lodash";
 
@NgModule({
  imports: [NgxFiLodashModule], // for consumption within the scope of the module
  exports: [NgxFiLodashModule] // if propagation is required
})
export class SomeModule {}

Where required

import { Inject } from "@angular/core";
import { LoDashStatic } from "lodash";
import { LODASH_TOKEN } from "ngx-fi-lodash";
 
export class SomeClass {
  constructor(@Inject(LODASH_TOKEN) private _: LoDashStatic) {}
}

For testing

import { LoDashStatic } from "lodash";
import { LODASH_TOKEN, NgxFiLodashModule } from "ngx-fi-lodash";
 
describe('TestingTitle', () => {
  let _: LoDashStatic;
  beforeEach(async(() => {
      TestBed.configureTestingModule({
        imports: [NgxFiLodashModule]
      });
 
      _ = TestBed.get(LODASH_TOKEN);
    }));
  }));
}));

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i ngx-fi-lodash

    Weekly Downloads

    6

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    18 kB

    Total Files

    20

    Last publish

    Collaborators

    • fiakkasa