/typographic-math-symbols

Use real symbols, not alphabetic characters

Primary LanguageJavaScript

typographic-math-symbols

NPM version Build Status Coveralls Status Dependency Status DevDependency Status

Use real symbols, not alphabetic characters

Micro module to help eliminate one of the bad typewriter habits.

Install

npm install --save typographic-math-symbols

Usage

var math = require('typographic-math-symbols');

math(`2 x 3 = 6`);  // 2 × 3 = 6
math(`3 - 2 = 1`);  // 3 − 2 = 1
math(`3 =< 2`);     // 3 ≤ 2
math(`4 >= 4`);     // 4 ≥ 4
math(`5 +- 1`);     // 5 ± 1
math(`10 -+ 1`);    // 10 ∓ 1
math(`2 << 100`);   // 2 ≪ 10000
math(`999 >> 5`);   // 999999 ≫ 5

License

MIT © Vladimir Starkov