open-index/open-npm huggingface dataset:
npm package: @iradek/sonet-appskit
Description: Set of common libraries and components helping to create SoNet enabled apps.
Author: i-Radek Software
Latest version: 1.0.12

# SonetAppskit

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

## Code scaffolding

Run `ng generate component component-name --project sonet-appskit` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project sonet-appskit`.
> Note: Don't forget to add `--project sonet-appskit` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build sonet-appskit` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

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

## Running unit tests

Run `ng test sonet-appskit` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @irae/express-middleware-timer
Description: A simple timer implementation for debugging express middleware.
Author: Joshua P. Mervine
Latest version: 1.0.0

express-middleware-timer
========================

[![Build Status](https://travis-ci.org/yp-engineering/express-middleware-timer.png?branch=master)](https://travis-ci.org/yp-engineering/express-middleware-timer) &nbsp; [![Dependancy Status](https://david-dm.org/yp-engineering/express-middleware-timer.png)](https://david-dm.org/yp-engineering/express-middleware-timer) &nbsp; [![NPM Version](https://badge.fury.io/js/express-middleware-timer.png)](https://badge.fury.io/js/express-middleware-timer)


A simple timer implementation for debugging express middleware.

> By default, `express-middleware-timer` does nothing. It's only activated
> when your application is started with `TIMER=true`.

Implementation
--------------

> Note:
>
> See [examples](examples) for more detailed working examples.

``` javascript
// require module
var emt = require('express-middleware-timer');

// init timer
app.use(emt.init());

/***
 * // custom report example
 *
 *  app.use(emt.init(function report(req, res) {
 *      var report = emt.calculate(req,res);
 *      console.log('TIMER: %s %s %s',
 *                      new Date(),
 *                      report.request.url,
 *                      JSON.stringify(report.timers));
 *  });
 *
 ***/

// instrument middleware
app.use(emt.instrument(myMiddleware), 'myMiddleware');

// instrument array of middlewares
var middlewares = emt.instrument([
    middlewareOne,
    middlewareTwo,
    middlewareThree
]);

middleware.forEach(function(middleware) {
    app.use(middleware);
});

// routes
app.get('/', myRoute);

// start
app.listen(3000);
```

Start Application
-----------------

To enable your timer, start your application with `TIMER=true`.

``` shell
TIMER=true node ./app.js

# to start the example
TIMER=true node ./example/app1.js
```

Sample Log Output
-----------------

> Note:
>
> See [`examples/simple.js`](examples/simple.js) for the code that generated this output.

``` javascript
{ request:
   { url: '/',
     headers:
      { host: 'localhost:3000',
        connection: 'keep-alive',
        accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36',
        'accept-encoding': 'gzip,deflate,sdch',
        'accept-language': 'en-US,en;q=0.8',
        'if-none-match': '"222957957"' } },
  timers:
   { startup: { from_start: 0, took: 0 },
     slowMiddleware: { took: 201, from_start: 201 },
     fastMiddleware: { took: 0, from_start: 201 } } }
```

Run Unit Tests
--------------

``` shell
npm install
npm test
```