JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q35453F
  • License ISC

Easily encode and decode strings using popular encrypting methods

Package Exports

  • npm-decode
  • npm-decode/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-decode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Decode

Easily encode and decode strings using popular encrypting methods

npm i @anay69420/npm-decode

Usage

import { decode } from 'decode'

console.log(decode.caeser.encode('Hello', 3)) // Khoor

Tree Shakable!!!

import { caeser, base64 } from 'decode'
// Still Works!

Ciphers

import { caeser } from 'decode'
caeser.encode('hello', 3) // khoor
caeser.decode('khoor', 3) // hello
import { base64 } from 'decode'
base64.encode('hello') // aGVsbG8=
base64.decode('aGVsbG8=') // hello
import { morse } from 'decode'
morse.encode('hello') // .... . .-.. .-.. ---
morse.decode('.... . .-.. .-.. ---') // hello
import { charCode } from 'decode'
charCode.encode('hello') // 104 101 108 108 111
charCode.decode('104 101 108 108 111') // hello
// You may optionally pass a string as a delimiter
charCode.encode('hello', '/') // 104/101/108/108/111
charCode.decode('104/101/108/111', '/') // hello
import { bacon } from 'decode'
bacon.encode('hello') // AABBB AABAA ABABA ABABA ABBAB
bacon.decode('AABBB AABAA ABABA ABABA ABBAB') // hello
// You may optionally pass an object containing values for character a and b
bacon.encode('hello', { a: '-', b: '/' }) // --/// --/-- -/-/- -/-/- -//-/
bacon.decode('--/// --/-- -/-/- -/-/- -//-/', '/', { a: '-', b: '/' }) // hello