open-index/open-npm huggingface dataset:
npm package: @meanie/angular-analytics
Description: An Angular wrapper service for Google Analytics
Author: Adam Reis
Latest version: 2.0.1

# @meanie/angular-analytics

[![npm version](https://img.shields.io/npm/v/@meanie/angular-analytics.svg)](https://www.npmjs.com/package/@meanie/angular-analytics)
[![node dependencies](https://david-dm.org/meanie/angular-analytics.svg)](https://david-dm.org/meanie/angular-analytics)
[![github issues](https://img.shields.io/github/issues/meanie/angular-analytics.svg)](https://github.com/meanie/angular-analytics/issues)
[![codacy](https://img.shields.io/codacy/2850488ca36c476ab5ada9c155741202.svg)](https://www.codacy.com/app/meanie/angular-analytics)


An Angular wrapper service for Google Analytics

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-analytics

#npm
npm install @meanie/angular-analytics --save
```

Include the script `node_modules/@meanie/angular-analytics/release/angular-analytics.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-analytics/release/angular-analytics.js"></script>
```

Add `Analytics.Service` as a dependency for your app.

## Usage
```js
angular.module('App', [
  'Analytics.Service'
])
.config(function($analyticsProvider, Config) {
  $analyticsProvider.setEnabled(Config.ANALYTICS_ENABLED && Config.ANALYTICS_TRACKING_ID);
})
.run(function($rootScope, $analytics, Config) {

  //Check if enabled
  if ($analytics.isEnabled()) {

    //Create site wide tracker
    $analytics.create(Config.ANALYTICS_TRACKING_ID);

    //On state changes, track page views
    $rootScope.$on('$stateChangeSuccess', function() {
      $analytics.track.pageview();
    });
  }
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-analytics issue tracker](https://github.com/meanie/angular-analytics/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/angular-convert
Description: An Angular service with various conversion helpers
Author: Adam Reis
Latest version: 2.3.1

# @meanie/angular-convert

[![npm version](https://img.shields.io/npm/v/@meanie/angular-convert.svg)](https://www.npmjs.com/package/@meanie/angular-convert)
[![node dependencies](https://david-dm.org/meanie/angular-convert.svg)](https://david-dm.org/meanie/angular-convert)
[![github issues](https://img.shields.io/github/issues/meanie/angular-convert.svg)](https://github.com/meanie/angular-convert/issues)
[![codacy](https://img.shields.io/codacy/bfb2443861974cd1a48cc49e5c350155.svg)](https://www.codacy.com/app/meanie/angular-convert)


An Angular service with various conversion helpers

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-convert

#npm
npm install @meanie/angular-convert --save
```

Include the script `node_modules/@meanie/angular-convert/release/angular-convert.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-convert/release/angular-convert.js"></script>
```

Add `Convert.Service` as a dependency for your app.

## Usage

```js
angular.module('App.MyModule').controller('MyController', function($convert) {

  //Convert strings
  var str = $convert.string.toCamelCase('snake_case'); //snakeCase
  var str = $convert.string.toSnakeCase('camelCase'); //camel_case
  var str = $convert.string.toDasherized('snake_and_camelCase'); //snake-and-camel-case
  var str = $convert.string.toUcfirst('lowercase'); //Lowercase

  //Convert object keys
  var obj = $convert.object.keysToCamelCase({snake_case: 1}); //{snakeCase: 1}
  var obj = $convert.object.keysToSnakeCase({camelCase: 1}); //{camel_case: 1}

  //Convert query strings
  var str = $convert.queryString.fromObject({a: 1, b: 2}); //a=1&b=2
  var obj = $convert.queryString.toObject('a=1&b=2'); //{a: 1, b: 2}
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-convert issue tracker](https://github.com/meanie/angular-convert/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-debounce
Description: A simple service for debouncing function calls
Author: Adam Reis
Latest version: 2.1.1

# @meanie/angular-debounce

[![npm version](https://img.shields.io/npm/v/@meanie/angular-debounce.svg)](https://www.npmjs.com/package/@meanie/angular-debounce)
[![node dependencies](https://david-dm.org/meanie/angular-debounce.svg)](https://david-dm.org/meanie/angular-debounce)
[![github issues](https://img.shields.io/github/issues/meanie/angular-debounce.svg)](https://github.com/meanie/angular-debounce/issues)
[![codacy](https://img.shields.io/codacy/73649c548d484d06a6cfa5a5cca5a982.svg)](https://www.codacy.com/app/meanie/angular-debounce)


A simple Angular service for debouncing function calls

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-debounce

#npm
npm install @meanie/angular-debounce --save
```

Include the script `node_modules/@meanie/angular-debounce/release/angular-debounce.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-debounce/release/angular-debounce.js"></script>
```

Add `Debounce.Service` as a dependency for your app.

## Usage

Include the `$debounce` service in your controller or component:

```js
angular.module('App.MyModule').controller('MyController', function($debounce) => {

  function someFunction() {
    console.log('I am debounced');
  }

  //Debounce
  $debounce(someFunction, 1000);
});
```

The `$debounce` service returns a promise which will be resolved with the return value of the debounced function once the underlying timeout resolves.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-debounce issue tracker](https://github.com/meanie/angular-debounce/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-duplicate-requests-filter
Description: A decorator for the Angular $http service to filter duplicate requests
Author: Adam Reis
Latest version: 2.1.1

# @meanie/angular-duplicate-requests-filter

[![npm version](https://img.shields.io/npm/v/@meanie/angular-duplicate-requests-filter.svg)](https://www.npmjs.com/package/@meanie/angular-duplicate-requests-filter)
[![node dependencies](https://david-dm.org/meanie/angular-duplicate-requests-filter.svg)](https://david-dm.org/meanie/angular-duplicate-requests-filter)
[![github issues](https://img.shields.io/github/issues/meanie/angular-duplicate-requests-filter.svg)](https://github.com/meanie/angular-duplicate-requests-filter/issues)
[![codacy](https://img.shields.io/codacy/2267d0906e9e4766a264332be4365050.svg)](https://www.codacy.com/app/meanie/angular-duplicate-requests-filter)


A decorator for the Angular $http service to filter duplicate requests

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-duplicate-requests-filter

#npm
npm install @meanie/angular-duplicate-requests-filter --save
```

Include the script `node_modules/@meanie/angular-duplicate-requests-filter/release/angular-duplicate-requests-filter.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-duplicate-requests-filter/release/angular-duplicate-requests-filter.js"></script>
```

Add `DuplicateRequestsFilter.Decorator` as a dependency for your app.

## Usage

Including the module as a dependency is enough and will automatically enable duplicate request filtering.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-duplicate-requests-filter issue tracker](https://github.com/meanie/angular-duplicate-requests-filter/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/angular-focus
Description: An Angular service to set focus on specific DOM elements
Author: Adam Reis
Latest version: 2.0.1

# @meanie/angular-focus

[![npm version](https://img.shields.io/npm/v/@meanie/angular-focus.svg)](https://www.npmjs.com/package/@meanie/angular-focus)
[![node dependencies](https://david-dm.org/meanie/angular-focus.svg)](https://david-dm.org/meanie/angular-focus)
[![github issues](https://img.shields.io/github/issues/meanie/angular-focus.svg)](https://github.com/meanie/angular-focus/issues)
[![codacy](https://img.shields.io/codacy/da49d6526e424c3394826592b19d86e3.svg)](https://www.codacy.com/app/meanie/angular-focus)


An Angular service to set focus on specific DOM elements

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-focus

#npm
npm install @meanie/angular-focus --save
```

Include the script `node_modules/@meanie/angular-focus/release/angular-focus.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-focus/release/angular-focus.js"></script>
```

Add `Focus.Service` as a dependency for your app.

## Usage
```js
angular.module('App.MyModule', [
  'Focus.Service'
]).controller('MyController', function($focus) {

  //Focus on element ID
  $focus('some-element-id');

  //Or focus on given DOM or jQuery/jQlite element
  $focus(someElement);

  //Focus after 250ms
  $focus(someElement, 250);

  //Focus and ensure element is selectable (e.g. for divs)
  $focus(someElement, 0, true);

  //Focus and select text of input field
  $focus(someElement, true); //OR
  $focus(someElement, 0, false, true);
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-focus issue tracker](https://github.com/meanie/angular-focus/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-geo-locate
Description: An Angular service for geo location
Author: Adam Reis
Latest version: 2.0.1

# @meanie/angular-geo-locate

[![npm version](https://img.shields.io/npm/v/@meanie/angular-geo-locate.svg)](https://www.npmjs.com/package/@meanie/angular-geo-locate)
[![node dependencies](https://david-dm.org/meanie/angular-geo-locate.svg)](https://david-dm.org/meanie/angular-geo-locate)
[![github issues](https://img.shields.io/github/issues/meanie/angular-geo-locate.svg)](https://github.com/meanie/angular-geo-locate/issues)
[![codacy](https://img.shields.io/codacy/23f91e13265b412b9e8926609b839992.svg)](https://www.codacy.com/app/meanie/angular-geo-locate)


An Angular service for geo location

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-geo-locate

#npm
npm install @meanie/angular-geo-locate --save
```

Include the script `node_modules/@meanie/angular-geo-locate/release/angular-geo-locate.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-geo-locate/release/angular-geo-locate.js"></script>
```

Add `GeoLocate.Service` as a dependency for your app.

## Usage

```js
angular.module('App.MyModule', [
  'GeoLocate.Service'
]).controller('MyController', function($geoLocate) {
  $geoLocate().then(function(position) {
    //Position obtained
  }, function(reason) {
    //Geolocation failed due to given reason
  });
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-geo-locate issue tracker](https://github.com/meanie/angular-geo-locate/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-google-maps
Description: Services and directives for using Google Maps with Angular
Author: Adam Reis
Latest version: 3.0.1

# @meanie/angular-google-maps

[![npm version](https://img.shields.io/npm/v/@meanie/angular-google-maps.svg)](https://www.npmjs.com/package/@meanie/angular-google-maps)
[![node dependencies](https://david-dm.org/meanie/angular-google-maps.svg)](https://david-dm.org/meanie/angular-google-maps)
[![github issues](https://img.shields.io/github/issues/meanie/angular-google-maps.svg)](https://github.com/meanie/angular-google-maps/issues)
[![codacy](https://img.shields.io/codacy/79d57a3b593d4af6a1064a92673bd4f9.svg)](https://www.codacy.com/app/meanie/angular-google-maps)


Services and directives for using Google Maps with Angular

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-google-maps

#npm
npm install @meanie/angular-google-maps --save
```

Include the script `node_modules/@meanie/angular-google-maps/release/angular-google-maps.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-google-maps/release/angular-google-maps.js"></script>
```

Add `GoogleMaps.Service` as a dependency for your app.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-google-maps issue tracker](https://github.com/meanie/angular-google-maps/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-log
Description: An extended drop in replacement for the built in Angular $log service
Author: Adam Reis
Latest version: 2.0.2

# @meanie/angular-log

[![npm version](https://img.shields.io/npm/v/@meanie/angular-log.svg)](https://www.npmjs.com/package/@meanie/angular-log)
[![node dependencies](https://david-dm.org/meanie/angular-log.svg)](https://david-dm.org/meanie/angular-log)
[![github issues](https://img.shields.io/github/issues/meanie/angular-log.svg)](https://github.com/meanie/angular-log/issues)
[![codacy](https://img.shields.io/codacy/4e1e3e31e0ed44759bea0cac8ef22d76.svg)](https://www.codacy.com/app/meanie/angular-log)


An extended drop in replacement for the built in Angular $log service

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-log

#npm
npm install @meanie/angular-log --save
```

Include the script `node_modules/@meanie/angular-log/release/angular-log.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-log/release/angular-log.js"></script>
```

Add `Log.Service` as a dependency for your app.

## Usage

This module is a drop-in replacement for the built-in `$log` service:

```js
angular.module('App.MyModule').controller('MyController', function($log) {
  $log.log('Log');
  $log.info('Info');
  $log.warn('Warning');
  $log.error('Error');
  $log.debug('Debug');
  $log.trace();
  $log.clear();
  $log.dir(obj);
  $log.assert(val, true);
});
```

Note that due to services not being available in the configuration phase of Angular applications, the `$log` service cannot be used at that time.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-log issue tracker](https://github.com/meanie/angular-log/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/angular-url
Description: An Angular service to provide URL helpers
Author: Adam Reis
Latest version: 2.0.2

# @meanie/angular-url

[![npm version](https://img.shields.io/npm/v/@meanie/angular-url.svg)](https://www.npmjs.com/package/@meanie/angular-url)
[![node dependencies](https://david-dm.org/meanie/angular-url.svg)](https://david-dm.org/meanie/angular-url)
[![github issues](https://img.shields.io/github/issues/meanie/angular-url.svg)](https://github.com/meanie/angular-url/issues)
[![codacy](https://img.shields.io/codacy/ec65c86183234042b3525691b8ac8a62.svg)](https://www.codacy.com/app/meanie/angular-url)


An Angular service to provide URL helpers

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`:

```shell
#yarn
yarn add @meanie/angular-url

#npm
npm install @meanie/angular-url --save
```

Include the script `node_modules/@meanie/angular-url/release/angular-url.js` in your build process, or add it via a `<script>` tag to your `index.html`:

```html
<script src="node_modules/@meanie/angular-url/release/angular-url.js"></script>
```

Add `Url.Service` as a dependency for your app.

## Usage

```js
angular.module('App.MyModule').controller('MyController', function($url) {

  //Concatenate URL parts without worrying about double slashes
  var baseUrl = '/api/v1/';
  var endpointUrl = '/user/';
  var url = $url.concat(baseUrl, endpointUrl); // /api/v1/user/
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/angular-url issue tracker](https://github.com/meanie/angular-url/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2015-2020, Adam Reis
npm package: @meanie/express-errors
Description: A collection of error classes for use in Express
Author: Adam Reis
Latest version: 5.3.2

# @meanie/express-errors

[![npm version](https://img.shields.io/npm/v/@meanie/express-errors.svg)](https://www.npmjs.com/package/@meanie/express-errors)
[![node dependencies](https://david-dm.org/meanie/express-errors.svg)](https://david-dm.org/meanie/express-errors)
[![github issues](https://img.shields.io/github/issues/meanie/express-errors.svg)](https://github.com/meanie/express-errors/issues)


A collection of error classes for use in Express or [Meanie Express Seed](https://github.com/meanie/express-seed) projects

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/express-errors

#npm
npm install @meanie/express-errors --save
```

## Usage

```js
//Load needed error classes
const errors = require('@meanie/errors');
const {BadRequestError, NotFoundError} = errors;

//Use in middleware
module.exports = someMiddleware(req, res, next) {
  next(new BadRequestError('Bad things happened'));
}
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/express-errors issue tracker](https://github.com/meanie/express-errors/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/express-jsonwebtoken
Description: A service for handling JSON Web Tokens in Express projects
Author: Adam Reis
Latest version: 3.2.1
Deprecated: This package is deprecated and no longer maintained. It is recommended to create your own simple web token service wrapper if needed.

# @meanie/express-jsonwebtoken

[![npm version](https://img.shields.io/npm/v/@meanie/express-jsonwebtoken.svg)](https://www.npmjs.com/package/@meanie/express-jsonwebtoken)
[![node dependencies](https://david-dm.org/meanie/express-jsonwebtoken.svg)](https://david-dm.org/meanie/express-jsonwebtoken)
[![github issues](https://img.shields.io/github/issues/meanie/express-jsonwebtoken.svg)](https://github.com/meanie/express-jsonwebtoken/issues)
[![codacy](https://img.shields.io/codacy/c0decdb116194cc9b1e7c1d53b6a8b3d.svg)](https://www.codacy.com/app/meanie/express-jsonwebtoken)


A service for handling JSON Web Tokens in Express or [Meanie Express Seed](https://github.com/meanie/express-seed) projects

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/express-jsonwebtoken

#npm
npm install @meanie/express-jsonwebtoken --save
```

## Usage

See the [Meanie Express Seed](https://github.com/meanie/express-seed) for usage.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/express-jsonwebtoken issue tracker](https://github.com/meanie/express-jsonwebtoken/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/express-validators
Description: A collection of basic validators for use in Express projects
Author: Adam Reis
Latest version: 1.3.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @meanie/express-validators

[![npm version](https://img.shields.io/npm/v/@meanie/express-validators.svg)](https://www.npmjs.com/package/@meanie/express-validators)
[![node dependencies](https://david-dm.org/meanie/express-validators.svg)](https://david-dm.org/meanie/express-validators)
[![github issues](https://img.shields.io/github/issues/meanie/express-validators.svg)](https://github.com/meanie/express-validators/issues)
[![codacy](https://img.shields.io/codacy/4864254c6487475690821ffd20c498f0.svg)](https://www.codacy.com/app/meanie/express-validators)

A collection of basic validators for use in Express or [Meanie Express Seed](https://github.com/meanie/express-seed) projects

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/express-validators

#npm
npm install @meanie/express-validators --save
```

## Usage

This is a collection of basic validators, see their function signatures for usage.


## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/express-validators issue tracker](https://github.com/meanie/express-validators/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2018-2020, Adam Reis
npm package: @meanie/joi-country
Description: A Joi extension to validate countries
Author: Adam Reis
Latest version: 2.2.0

# @meanie/joi-country

[![npm version](https://img.shields.io/npm/v/@meanie/joi-country.svg)](https://www.npmjs.com/package/@meanie/joi-country)
[![node dependencies](https://david-dm.org/meanie/joi-country.svg)](https://david-dm.org/meanie/joi-country)
[![github issues](https://img.shields.io/github/issues/meanie/joi-country.svg)](https://github.com/meanie/joi-country/issues)


A Joi extension to validate countries

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

### Features
- Extends string validation to include a country code validator
- Uses a supplied validator function to avoid relying on a fixed country codes list
- Simply load or create the validator you want, and pass it to the Joi extension

### Installation

```shell
#npm
npm install @meanie/joi-country

#yarn
yarn add @meanie/joi-country
```

### Usage
```js
const Joi = require('@hapi/joi');
const JoiCountry = require('@meanie/joi-country');

//Validator
const countryCodeValidator = function(code) {
  //...some validation against a list of country codes
};

//Set validator
JoiCountry.setValidator(countryCodeValidator);

module.exports = Joi.extend(JoiCountry);
```

### Examples

```js
const schema = Joi.object({
  country: Joi.string().country(),
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [meanie-joi-country issue tracker](https://github.com/meanie/joi-country/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2019-2020, Adam Reis
npm package: @meanie/joi-moment
Description: A Joi extension to automatically convert ISO date strings to moment objects and validate using moment functions
Author: Adam Reis
Latest version: 2.5.1

# @meanie/joi-moment

[![npm version](https://img.shields.io/npm/v/@meanie/joi-moment.svg)](https://www.npmjs.com/package/@meanie/joi-moment)
[![node dependencies](https://david-dm.org/meanie/joi-moment.svg)](https://david-dm.org/meanie/joi-moment)
[![github issues](https://img.shields.io/github/issues/meanie/joi-moment.svg)](https://github.com/meanie/joi-moment/issues)


A Joi extension to automatically convert ISO date strings to moment objects

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

### Features
- Validates incoming date values as ISO date strings
- Automatically converts date strings to `moment` objects
- Able to specify timezone and use modifiers like `startOf` or `endOf`
- Able to validate using moment functions like `isAfter` or `isBefore`

### Installation

```shell
#npm
npm install @meanie/joi-moment

#yarn
yarn add @meanie/joi-moment
```

### Usage
```js
const Joi = require('@hapi/joi');
const JoiMoment = require('@meanie/joi-moment');

module.exports = Joi.extend(JoiMoment);
```

### Examples

```js
const schema = Joi.object({
  startDate: Joi.moment().tz(timezone).startOf('day'),
  endDate: Joi.moment().tz(timezone).endOf('day').isAfter(Joi.ref('startDate')),
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [meanie-joi-moment issue tracker](https://github.com/meanie/joi-moment/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2019-2020, Adam Reis
npm package: @meanie/joi-object-id
Description: A Joi extension to validation MongoDB ObjectId formats
Author: Adam Reis
Latest version: 2.3.0

# @meanie/joi-object-id

[![npm version](https://img.shields.io/npm/v/@meanie/joi-object-id.svg)](https://www.npmjs.com/package/@meanie/joi-object-id)
[![node dependencies](https://david-dm.org/meanie/joi-object-id.svg)](https://david-dm.org/meanie/joi-object-id)
[![github issues](https://img.shields.io/github/issues/meanie/joi-object-id.svg)](https://github.com/meanie/joi-object-id/issues)


A Joi extension to automatically convert ISO date strings to object-id objects

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

### Features
- Extends the existing `string` validator
- Validates incoming values as MongoDB ObjectId values
- Automatically converts values to Mongoose `ObjectId` instances

### Installation

```shell
#npm
npm install @meanie/joi-object-id

#yarn
yarn add @meanie/joi-object-id
```

### Usage
```js
const Joi = require('@hapi/joi');
const JoiObjectId = require('@meanie/joi-object-id');

module.exports = Joi.extend(JoiObjectId);
```

### Examples

```js
const schema = Joi.object({
  user: Joi.string().objectId(),
});
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [meanie-joi-object-id issue tracker](https://github.com/meanie/joi-object-id/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2019-2020, Adam Reis
npm package: @meanie/mongoose-only-id
Description: Mongoose helper to safely strip objects to just an ID
Author: Adam Reis
Latest version: 2.4.0

# @meanie/mongoose-only-id

[![npm version](https://img.shields.io/npm/v/@meanie/mongoose-only-id.svg)](https://www.npmjs.com/package/@meanie/mongoose-only-id)
[![node dependencies](https://david-dm.org/meanie/mongoose-only-id.svg)](https://david-dm.org/meanie/mongoose-only-id)
[![github issues](https://img.shields.io/github/issues/meanie/mongoose-only-id.svg)](https://github.com/meanie/mongoose-only-id/issues)
[![codacy](https://img.shields.io/codacy/e178bf57ecbf469e97c1f03d44a8cca9.svg)](https://www.codacy.com/app/meanie/mongoose-only-id)


Simple Mongoose helper to safely strip objects to just an ID

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/mongoose-only-id

#npm
npm install @meanie/mongoose-only-id --save
```

## Usage


```js
const onlyId = require('meanie-mongoose-only-id');

//Objects are stripped to only ID
onlyId({id: '123', name: 'Name'}); //'123'
onlyId({_id: new ObjectId('123'), name: 'Name'}); //'123'

//Also works on arrays
onlyId([
  {id: '123', name: 'Item 1'},
  {_id: new ObjectId('123'), name: 'Name'},
]); //['123', '123']

//Simple values are retained
onlyId('123'); //'123'
onlyId(123); //123
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/mongoose-only-id issue tracker](https://github.com/meanie/mongoose-only-id/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/mongoose-update-denormalized
Description: A plugin for Mongoose to update denormalized data
Author: Adam Reis
Latest version: 2.3.0

# @meanie/mongoose-update-denormalized

[![npm version](https://img.shields.io/npm/v/@meanie/mongoose-update-denormalized.svg)](https://www.npmjs.com/package/@meanie/mongoose-update-denormalized)
[![node dependencies](https://david-dm.org/meanie/mongoose-update-denormalized.svg)](https://david-dm.org/meanie/mongoose-update-denormalized)
[![github issues](https://img.shields.io/github/issues/meanie/mongoose-update-denormalized.svg)](https://github.com/meanie/mongoose-update-denormalized/issues)
[![codacy](https://img.shields.io/codacy/400e8324a71d4410b9dc3980b5f8cdea.svg)](https://www.codacy.com/app/meanie/mongoose-update-denormalized)


A plugin for Mongoose to normalize JSON output

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/mongoose-update-denormalized

#npm
npm install @meanie/mongoose-update-denormalized --save
```

## Usage

Setup as a global plugin for all Mongoose schema's:

```js
const mongoose = require('mongoose');
const updateDenormalized = require('@meanie/mongoose-update-denormalized');

mongoose.plugin(updateDenormalized);
```

Or for a specific (sub) schema:

```js
const mongoose = require('mongoose');
const updateDenormalized = require('@meanie/mongoose-update-denormalized');
const {Schema} = mongoose;

const MySchema = new Schema({});
MySchema.plugin(updateDenormalized);
```

This plugin exposes a static method to update denormalized data:

```js
const User = mongoose.model('User');
const {_id, name, region} = location;
await User.updateDenormalized('location', _id, {name, region});
```

This would update the `name` and `region` properties on the denormalized `location`
property on users, for the given matching location ID.

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/mongoose-update-denormalized issue tracker](https://github.com/meanie/mongoose-update-denormalized/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/multer-mime-types-filter
Description: Helper to create a mime types filter for Multer given an array of mime types
Author: Adam Reis
Latest version: 2.0.1

# @meanie/multer-mime-types-filter

[![npm version](https://img.shields.io/npm/v/@meanie/multer-mime-types-filter.svg)](https://www.npmjs.com/package/@meanie/multer-mime-types-filter)
[![node dependencies](https://david-dm.org/meanie/multer-mime-types-filter.svg)](https://david-dm.org/meanie/multer-mime-types-filter)
[![github issues](https://img.shields.io/github/issues/meanie/multer-mime-types-filter.svg)](https://github.com/meanie/multer-mime-types-filter/issues)
[![codacy](https://img.shields.io/codacy/c0decdb116194cc9b1e7c1d53b6a8b3d.svg)](https://www.codacy.com/app/meanie/multer-mime-types-filter)


Helper to create a mime types filter for Multer given an array of mime types

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/multer-mime-types-filter

#npm
npm install @meanie/multer-mime-types-filter --save
```

## Usage

```js
const multer = require('multer');
const mimeTypesFilter = require('@meanie/multer-mime-types-filter');

/**
 * Upload middleware
 */
upload(req, res, next) {

  //Get locals
  const mimeTypes = ['image/jpeg', 'image/png', 'image/gif'];

  //Create upload middleware
  let upload = multer({
    storage: multer.memoryStorage(),
    fileFilter: mimeTypesFilter(mimeTypes),
  }).single('file');

  //Use middleware
  upload(req, res, next);
}
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/multer-mime-types-filter issue tracker](https://github.com/meanie/multer-mime-types-filter/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanie/passport-refresh-strategy
Description: A refresh token authentication strategy for Passport
Author: Adam Reis
Latest version: 3.1.0

# @meanie/passport-refresh-strategy

[![npm version](https://img.shields.io/npm/v/@meanie/passport-refresh-strategy.svg)](https://www.npmjs.com/package/@meanie/passport-refresh-strategy)
[![node dependencies](https://david-dm.org/meanie/passport-refresh-strategy.svg)](https://david-dm.org/meanie/passport-refresh-strategy)
[![github issues](https://img.shields.io/github/issues/meanie/passport-refresh-strategy.svg)](https://github.com/meanie/passport-refresh-strategy/issues)
[![codacy](https://img.shields.io/codacy/7872d6222f1348a8aa9df98f422ad007.svg)](https://www.codacy.com/app/meanie/passport-refresh-strategy)


A refresh token authentication strategy for Passport

![Meanie](https://raw.githubusercontent.com/meanie/meanie/master/meanie-logo-full.png)

## Installation

You can install this package using `yarn` or `npm`.

```shell
#yarn
yarn add @meanie/passport-refresh-strategy

#npm
npm install @meanie/passport-refresh-strategy --save
```

## Usage

```js
//Dependencies
const passport = require('passport');
const jwt = require('@meanie/express-jsonwebtoken');
const RefreshStrategy = require('@meanie/passport-refresh-strategy');
const {InvalidTokenError} = jwt;

//Your custom user service
const User = require('./user.service');

//Setup strategy
passport.use(new RefreshStrategy((refreshToken, cb) => {

  //No refresh token?
  if (!refreshToken) {
    return cb(null, false);
  }

  //Validate token
  jwt
    .validate(refreshToken)
    .then(User.findByTokenPayload)
    .then(user => {
      if (!user) {
        throw new InvalidTokenError('No matching user found');
      }
      return cb(null, user);
    })
    .catch(cb);
}));
```

## Issues & feature requests

Please report any bugs, issues, suggestions and feature requests in the [@meanie/passport-refresh-strategy issue tracker](https://github.com/meanie/passport-refresh-strategy/issues).

## Contributing

Pull requests are welcome! If you would like to contribute to Meanie, please check out the [Meanie contributing guidelines](https://github.com/meanie/meanie/blob/master/CONTRIBUTING.md).

## Sponsor

This package has been kindly sponsored by [Hello Club](https://helloclub.com?source=meanie), an [all in one club and membership management solution](https://helloclub.com?source=meanie) complete with booking system, automated membership renewals, online payments and integrated access and light control. Check us out if you happen to belong to any kind of club or if you know someone who helps run a club!

## License

(MIT License)

Copyright 2016-2020, Adam Reis
npm package: @meanii/tinydb
Description: tinydb is something, which you can use for as local non-sql database
Author: anil chauhan
Latest version: 0.1.0


# tinydb 💫

tinydb is json database, which you can use for as local non-sql database.

## installtion
```bash
yarn add @meanii/tinydb
```

## How to init it?

```javascript
import { Tinydb } from "@meanii/tinydb";

const db = new Tinydb(`touka.ssh`);
```

```javascript
class ToukaStorage extends Tinydb {
    constructor() {
        super(`touka.ssh`)
    }
}

const db = new ToukaStorage()
```

## methods

### insertOne

```javascript
await db.insertOne({username: `meanii`})
```

### findOne

```javascript
const data = await db.findOne({username: `meanii`})
console.log(data)
```
```javascript
{
  username: 'meanii',
  uuid: 'd95f3826-f82a-4944-9d56-df28740009f0',
  createdAt: '2022-11-05T11:12:05.196Z',
  updatedAt: '2022-11-05T11:12:05.196Z'
}
```


### deleteMany

```javascript
await db.deleteMany({ username: `meanii` })
```

### findOneAndUpdate

```javascript
await db.findOneAndUpdate({ username: `meanii` }, { status: `updated` })
```
---

### Copyright & License

- Copyright (C)  2022 [anil chauhan](https://github.com/meanii )
- Licensed under the terms of
the [MIT License](https://github.com/meanii/tinydb/blame/main/LICENSE)