This package has been deprecated

Author message:

this package has been deprecated

lesswork-hashids

0.0.5 • Public • Published

lesswork-hashids

This is a hashids provider for the lesswork-framework.

Installation

npm i --save lesswork-hashids

Register the provider and alias in your config/app.js file.

const providers = [
  ...
  'lesswork-hashids/providers/HashProvider',
];
 
const aliases = {
  ...
  Hashids: 'Lesswork/Hashids',
};

Configuration

By default your key will be APP_KEY.

You can adjust the configurations by creating the file config/hashids.js

'use strict'

module.exports = {
  key: 'secret',
  length: 5,
  alaphabet: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',
};

Usage

See hashids for full usage information.

const Hashids = use('Hashids');
 
console.log(Hashids.encode(1));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i lesswork-hashids

Weekly Downloads

1

Version

0.0.5

License

MIT

Unpacked Size

3.29 kB

Total Files

6

Last publish

Collaborators

  • askedio