npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

iaudit-core-library

v17.0.5

Published

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.6.

Downloads

111

Readme

IauditCoreLibrary

This library was generated with Angular CLI version 12.0.6.

Code scaffolding

Run ng generate component component-name --project iaudit-core-library to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project iaudit-core-library.

Note: Don't forget to add --project iaudit-core-library or else it will be added to the default project in your angular.json file.

Build

Run ng build iaudit-core-library to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build iaudit-core-library, go to the dist folder cd dist/iaudit-core-library and run npm publish.

Running unit tests

Run ng test iaudit-core-library to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Content

Here you will find all the resources available to be used in the application

[ApplicationService]

Your responsibility is to manager all notifications

Methods

notifyUser(user: any): void
notifyTranslate(language: DataValueResponse): void

Variables

- public userEmmitter: EventEmitter<string> = new EventEmitter(null);
- public translateEmmitter: EventEmitter<DataValueResponse> = new EventEmitter(null);

[CookieService]

Your responsibility is to manage custom cookies

Methods

get(name: string): any
create(name: string, value: any): void
delete(name: string ): void  

[CookieUserService]

Your responsability is to manager informations about user

Methods

create(response: any): void
delete(): void
getUserInfo(): UserInfo

[CookieLanguageService]

Your responsability is to manager informations about language

Methods

create(language: any): void
delete(): void 
get(): DataValueResponse[]

[CookieCustomerService]

Your responsability is to manager informations about customer

Methods

create(customer: string): void
get(): string
delete(): void

[AuthenticationService]

Your responsability is to manager life cicle user

Methods

createSession(expiresIn: number): any
tokenExpired(): boolean
login(user: Authentication, apiUrl: string): Observable<any>
logout(): void
change(changePassword: ChangePassword, url: string): Observable<any> 
recover(recover: RecoverPassword, url: string): Observable<any>
isAuthenticated()

Types

export enum UserType {
    External = 1,
    Internal = 2
  }

  export enum GmtType {
    Application,
    User
  }

[CustomTranslateService]

Your responsibility is to configure '@ngx-translate/core' and allow the language to be changed.

Methods

setup(codes: string[]): void
use(code: string): void

Share

This section is more important, here we have mandatory and other optional features to be used in the applications.

[BaseComponent]

Your responsibility is to share resources with all angular components. To use it will be necessary to inherit this class

Methods

ngOnInit(): void
translate(key: string): string
translateButtonPagination(): void
getActives(): void 
onEditorChangeValue(owner: any): void
updateLocate(code: string = null): void
ngAfterViewInit(): void
validateField(form: FormGroup, field: string, error: string = 'required'): boolean
openModal(modalId: string): void
closeModal(modalId: string): void
split(text: string, character: string): string[]
activeTab(tabId: string): void
getFormValidationErrors(form: FormGroup): void
getTabKey(form: FormGroup): string
private findInput(key: string): string
protected getCookieUser(): string 
protected getGmt(who: GmtType)
protected setTimeZone(date: Date, gmt: number): Date
public setCookieUser(cookieUserName: string): void
mustMatch(controlName: string, matchingControlName: string)

[Tabs - SmartAdmin]

<ul class="nav nav-pills nav-justified" role="tablist">
    <li class="nav-item"><a class="nav-link active" data-toggle="tab"  name='js_change_pill_justified-1' href="#js_change_pill_justified-1">{{'context.report.create.tabs.tab01' | translate}}</a>
    </li>
    <li class="nav-item"><a class="nav-link" data-toggle="tab"  name='js_change_pill_justified-2' href="#js_change_pill_justified-2">{{'context.report.create.tabs.tab02' | translate}}</a>
    </li>
<ul>

<div class="tab-content py-3">
    <div class="tab-pane fade show active" id="js_change_pill_justified-1" role="tabpanel">
    <div class="row">  
    <div class="col-lg-3">
      <div class="form-group">
        <label class="control-label">{{'context.report.create.denounced.function' | translate}}</label>
        <div class="input-group bg-white shadow-inset-2">                      
          <input [readonly]="isReadOnlyReportData" type="text" class="form-control" formControlName="Function" id="Function" tab="js_change_pill_justified-1">
        </div>
        <span *ngIf="validateField(denouncedForm,'Function')" class="text-danger help-block"><strong>
          {{'messages.requiredfield' | translate}}
        </strong> </span>
      </div>
    </div>                       
    </div>                    
    <div class="tab-pane fade" id="js_change_pill_justified-2" role="tabpanel">
       <div class="row">  
    <div class="col-lg-3">
      <div class="form-group">
        <label class="control-label">{{'context.report.create.denounced.LastNanme' | translate}}</label>
        <div class="input-group bg-white shadow-inset-2">                      
          <input [readonly]="isReadOnlyReportData" type="text" class="form-control" formControlName="LastName" id="LastName" tab="js_change_pill_justified-2">
        </div>
        <span *ngIf="validateField(denouncedForm,'LastName')" class="text-danger help-block"><strong>
          {{'messages.requiredfield' | translate}}
        </strong> </span>
      </div>
    </div>
</div>

Obs. play attention on id inputs property and tab property.

if (!this.form.valid) {
      const tab = this.getTabKey(this.form);
      this.activeTab(tab); 
      this.form.markAllAsTouched();
      this.message.fire({
        icon: 'error',
        title: this.translate('messages.dialogs.title'),
        text: this.translate('messages.dialogs.required'),
        footer: ''
      });
      return;
    }

Case want show specific tab use this this.activeTab('js_change_pill_justified-2')

#### [Models]
Here we are have some generics models to use in application
> class

```sh
export class DataResponse {
    public success = false;
}

export class DataValueResponse {
    constructor(
        public Id: any = null,
        public Name: string = null,
        public Code: string = null
    ) { }
}

export class Dropdown extends DataResponse {
    constructor(
        public data: DataValueResponse[] = null
    ) {
        super();
    }
}

Public variables

declare var $: any;
defineLocale('pt-br', ptBrLocale);
config: NgSelectConfig;
authenticationService: AuthenticationService;
applicationService: ApplicationService;
cookieLanguageService: CookieLanguageService;
cookieUserService: CookieUserService;
cookieService: CookieService;
customTranslateService: CustomTranslateService;
crosscutService: CrosscutService;
localeService: BsLocaleService;
subscription: Subscription;
route: ActivatedRoute;
router: Router;
fb: FormBuilder;
form: FormGroup;
nameMask: any = null;
maskType: any = null;
placeholderMask: any = null;
errors: any[] = [];
message = Swal;
@ViewChild('editor') editor: { dataChange: { subscribe: (arg0: (value: string) => void) => void; }; };
locales: string[];
page = 1;
pageBefore = '';
pageNext = '';
modalId = '';
isSearch = false;
canDelete = false;
maxDate: Date = new Date();
currentlanguage: DataValueResponse;
actives = new Array<DataValueResponse>();
element: ElementRef;
spinner: NgxSpinnerService;
gmt: number;

[Required Module]

Your responsibility is to share all visual and non-visual components for each application module.

Exports

imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    HttpClientModule,
    NgxPaginationModule,
    NgxCurrencyModule,
    NgxMaskModule.forRoot(options),
    BsDatepickerModule.forRoot(),
    NgSelectModule,
    NgxDropzoneModule,
    TranslateModule,
    NgxSpinnerModule
  ],
declarations: [
    IauditDataFilterPipe
  ],
exports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    HttpClientModule,
    NgxPaginationModule,
    NgxCurrencyModule,
    NgxMaskModule,
    BsDatepickerModule,
    NgSelectModule,
    CKEditorModule,
    NgxDropzoneModule,
    TranslateModule,
    IauditDataFilterPipe
  ]
  
Obs.  IauditDataFilterPipe it is a pipe, to use is necessary call per your name
@Pipe({
  name: 'iauditdatafilter',
  pure: false
})
Exemple as use this pipe

<tbody>
                                  <tr class="d-flex"
                                  *ngFor="let item of customers | paginate: { itemsPerPage: 20, currentPage: page, id:'pgCustomer' } | iauditdatafilter: {'Name': searchInput}">

[BaseService]

Your responsibility is to share resources about calls with api.

Methods

protected translate(key: string): string
protected getHeaderJson(): { headers: HttpHeaders; } 
protected getHeaderFormDataWithoutContent():
protected getHeaderFormData(name: string): { headers: HttpHeaders; }
protected getAuthHeaderJson(): { headers: HttpHeaders; }
protected getUserToken(): string
protected extractData(response: any): any
protected serviceError(error: Response | any): Observable<never>
protected getGmt(who: GmtType)
protected setTimeZone(date: Date, gmt: number): Date
protected getCookieUser(): string
public setUrl(urlApi: string): void
public setCookieUser(cookieUserName: string): void

[CrosscutService]

Your responsibility is not to provide adequate abstractions to modularize.

Methods

newGuid(): string
nullGuid(): string 
getYesNo(): DataValueResponse[]
getCountries(): DataValueResponse[]

[CryptoRSAService]

Your responsibility is to encrypt plain-text data using a provided RSA public key (RSA‑OAEP with SHA‑256)

Methods

encrypt(publicKey: string): Promise<string>

Variables

- private publicKey?: CryptoKey

Injection

// in your AppModule (or wherever you configure providers)
providers: [
  { 
    provide: RSA_PUBLIC_KEY, 
    useValue: '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkq…\n-----END PUBLIC KEY-----' 
  }

Usage

constructor(private cryptoRSA: CryptoRSAService) {}

async sendSecure() {
  const cipherText = await this.cryptoRSA.encrypt('confidential text');
  console.log(cipherText); // encrypted in Base64
}