Skip to content

Simple REST API to get basic Unicode character information

Notifications You must be signed in to change notification settings

splatterxl/unicode-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unicode Info

Runs as a HTTP server that proxies requests to https://fileformat.info and scrapes the HTML output of that.

Installation

# clone the repository
git clone [email protected]:splatterxl/unicode-info
cd unicode-info

# install dependencies
npm install --global typescript
npm install

# build the program
tsc .

Usage

The app registers an HTTP server that you can query, to get it running just run the compiled file index.js:

PORT=8080 node ./index.js

Then, to query information about a character send a GET request to /info?char={hex_code_point}, where hex_code_point is the Unicode code point of the character encoded in hexadecimal.

For example, to get information about the line feed character \n:

const charCode = '\n'.charCodeAt(0).toString(16);

fetch(`http://localhost:8080/info?char=${charCode}`).then(res => res.json()).then(console.log)

About

Simple REST API to get basic Unicode character information

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •