Socket
Socket
Sign inDemoInstall

ngx-fi-moment

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-fi-moment

moment for ngx projects


Version published
Maintainers
1
Created
Source

NgxFiMoment

moment as ngx-fi-moment

Installation

  • npm i moment --save
  • npm i ngx-fi-moment --save

How to use

In a module

import { NgModule } from "@angular/core";
import { NgxFiMomentModule } from "ngx-fi-moment";

@NgModule({
  imports: [NgxFiMomentModule], // for consumption within the scope of the module
  exports: [NgxFiMomentModule] // if propagation is required
})
export class SomeModule {}

Where required

import { Inject } from "@angular/core";
import { MomentDefinition, MOMENT_TOKEN } from "ngx-fi-moment";

export class SomeClass {
  constructor(@Inject(MOMENT_TOKEN) private moment: MomentDefinition) {}
}

For testing

import { NgxFiMomentModule } from "ngx-fi-moment";
import { MomentDefinition, MOMENT_TOKEN } from "ngx-fi-moment";

describe('TestingTitle', () => {
  let moment: MomentDefinition;
  beforeEach(async(() => {
      TestBed.configureTestingModule({
        imports: [NgxFiMomentModule]
      });

      moment = TestBed.get(MOMENT_TOKEN);
    }));
  }));
}));

Keywords

FAQs

Package last updated on 07 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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