Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/DsxylieaPublic archive

constantly shifting text on your browser

NotificationsYou must be signed in to change notification settings

Vaporjawn/Dsxyliea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

After seeing the webpage titled "dyslexia" (http://geon.github.io/programming/2016/03/03/dsxyliea), by Victor Widell from 2012 I thought it was the coolest concept. Then I thought "why doesn't this exist for browsers. It'll mix things up and make the webpages look cool."

Jumble text to simulate reading with Dsxyliea

Usage

varDsxyliea=require('Dsxyliea');console.log(Dsxyliea("Sometimes I see things right to left and I know that's not right at all"));//=> Sitemomes I see thnigs right to lfet and I know that\'s not right at allconsole.log(Dsxyliea.scrambleWord("Wednesday"));//=> Wedsendayconsole.log(Dsxyliea("I'm not saying I invented the turtleneck, but I was the first person to realise its potential as a tactical garment.",{minWordLength:2,scrambleChance:80}));//=> I\'m not saying I invented the tureneltck, but I was the first perosn to realise its potential as a tactical ganemrt.

Install

$ npm install Dsxyliea

API

Dsxyliea(sentence, options)

Returns a dyslexified sentence

sentence

Type:string

options

minWordLength

Type:intDefault:3

Minimum length a word has to be in order for it to be scrambled.

scrambleChance

Type:intDefault:100

Percentage chance out of100 of a word being scrambled.100 = will always be scrambled.0 = never scrambled.

Dsxyliea.scrambleWord(word)

Returns a dyslexified word

word

Type:string

options

minWordLength

Type:intDefault:3

Minimum length a word has to be in order for it to be scrambled.

scrambleChance

Type:intDefault:90

Percentage chance of a word being scrambled.100 = will always be scrambled.


[8]ページ先頭

©2009-2025 Movatter.jp