1.0.1 • Published 3 years ago

base52 v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
3 years ago

Convert digits (integer) to alphabetical character and vice versa

It's useful to hide object id in url, for example instead of integer number 1 /article/comments/1 use base52 encoder to show b

Numbers beginning from a that equals 0 and Z that equals 51;

Installation with NPM

npm i base52

Usage syntax

const x = require('base52');

console.log(x.base52Decode('srLweV')); // output: 17902030294
console.log(x.base52Encode(98346982)); // output: gWwxn

VUEJs Mixin

import HelloWorld from './components/HelloWorld.vue'
import {VueBase52Mixin} from 'base52'

export default {
  name: 'App',
  components: {
    HelloWorld,
  },
  mixins: [VueBase52Mixin]
1.0.1

3 years ago

1.0.0

3 years ago