service-utility
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

Service Utility

This library is designed to enhance code reusability, streamline development, and promote efficiency.

Installation

npm i service-utility

To utilize HTTP calls effectively

import { APIService } from 'service-utility';
constructor(
	private apiService: APIService
) {
    this.apiService.get('').subscribe((res) => {

	})
}

To utilize Common functions effectively

import { CommonService } from 'service-utility';

For Toaster

  1. Import to app.module.ts
import { ToasterModule } from 'service-utility';

ToasterModule.forRoot({ preventDuplicates: true, positionClass: 'toast-top-right', timeOut: 4000 }),
  1. add in angular.json
"node_modules/service-utility/lib/toaster/assets/toastr.css",
  1. use in component.ts
import { ToasterService } from 'service-utility';
private toaster: ToasterService
toaster.success('Data Successfully updated!')

Usage

import foobar

# returns 'words'
foobar.pluralize('word')

# returns 'geese'
foobar.pluralize('goose')

# returns 'phenomenon'
foobar.singularize('phenomena')

Readme

Keywords

none

Package Sidebar

Install

npm i service-utility

Weekly Downloads

4

Version

0.0.11

License

none

Unpacked Size

590 kB

Total Files

49

Last publish

Collaborators

  • deepak-tech