🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

typescript-angular-utilities

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-angular-utilities

Typescript utility classes published as angular services

2.7.4
Source
npm
Version published
Weekly downloads
96
242.86%
Maintainers
1
Weekly downloads
 
Created
Source

TypeScript-Angular-Utilities

Contains a list of reusable TypeScript libraries, services, and general utilities. These are all defined as angular services and can be injected via the angular dependency injector.

Behaviors

Angular directives that are applied as attributes to an element in order to modify the element's behavior.

  • stopEventPropogation

Filters

Contains Angular filters, which can be applied to bindings using the Angular pipe operator <span>{{myMoney | currency}}</span>

Contains a generic filter interface IFilter

Services

Contains miscellaneous tools and utilities for working with objects and other useful tasks.

Injecting a service

import { services } from 'typescript-angular-utilities';
import objectNamespace = services.object;

export class MyController {
  static $inject: string[] = [objectNamespace.serviceName];
  constructor(private objectService: objectNamespace.IObjectUtility): void {
  }

  ...

  private testForEmpty(): boolean {
    return this.objectService.isNullOrEmpty(this.someValue);
  }
}

angular.module('moduleName', [objectNamespace.moduleName])
  .controller('controllerName', MyController);

Setup

Clone the repository into your working directory.

Node must be installed.

Install the karma client: npm install karma -g

Install the typescript compiler: npm install typescript -g

Navigate to the root of the repo in a cmd prompt and run:

  • npm run update

Building and Testing

Please always test new builds to ensure non-breaking commits and PRs

To build: npm run build

To test: npm test To debug tests: npm run test.debug To run tests against additional browsers: npm run test.full

Keywords

typescript

FAQs

Package last updated on 04 Feb 2016

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