Nebulous Pumpkin Moons

    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));

    Keywords

    none

    Install

    npm i lesswork-hashids

    DownloadsWeekly Downloads

    0

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    3.29 kB

    Total Files

    6

    Last publish

    Collaborators

    • askedio