New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zalgor

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zalgor

1.0.2
Rubygems
Version published
Maintainers
1
Created
Source

DESCRIPTION

Zalgo text is digital text that has been modified with combining characters (Unicode symbols that are generally used to stack diacritics above and below letters) to appear creepy or glitchy. see: https://en.wikipedia.org/wiki/Zalgo_text

INSTALLATION

# gem install zalgor

USAGE

Simple transformation:

require 'zalgor'

# transform a string
str = 'Hello World'
puts Zalgor.transform str

Simple purification:

require 'zalgor'

# purify a string

str = 'Hello World'
str = Zalgor.transform(str)
puts str
# exemple : H̵͉̣̀̀̊è̖̻͒̎͘ļ̵̙̥̐̽l̸̡̖̠̿ͫŏ̸̭̲̑͡ ̷̱̃͑͡ͅẀ̘͙̐͞͡o͠҉̻̮ͬ̌r̨͔̜͂̈̕l͏̴̪̙̏̎d̴̡ͮ͛

str = Zalgor.purify(str)
puts str
# 'Hello World'

Simple transformation directly in String class:

require 'zalgor/string'

# String has "to_zalgo" instance method
puts 'Hello World'.to_zalgo

Transformation options:

# Zalgor.transform(string, **options)
# options can be:
# down:   Integer, the number of down combining chars
# mid:    Integer, the number of mid combining chars
# up:     Integer, the number of up combining chars
# random: Boolean, random each options (0..down|mid|up)
# default options if not specified
str = 'Hello World'

# with options
Zalgor.transform(str, down: 10, mid: 5, up: 1, random: true)

# with default options
Zalgor.transform(str)

LICENSE

MIT

FAQs

Package last updated on 01 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts