Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atypograf

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atypograf

JavaScript port for ArtLebedev Typograf

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

atypograf

This is Node.js library for ArtLebedev's typograf http://www.artlebedev.ru/tools/typograf/

Usage

Library can be downloaded through npm easily npm install atypograf

Then atypograf is easy to use as the following:

var typograf = require('atypograf');

typograf.process('Abc - "1234абы"', {
	type: typograf.TYPE_MIXED_ENTITIES,
	useBr: 1,
	useP: 1,
	maxNobr: 1
}, function(err, text)
{
	if (err)
	{
		console.log('Error ocurred: ' + err.toString());
		return;
	}

	// Success
	console.log('Typografed string: ('+ text +')');
});

Options

ParameterDescription
typeDefines type of result entities that will be considered by typograf.
Following consstants are defined in exported object:
TYPE_HTML_ENTITIES, TYPE_XML_ENTITIES, TYPE_NO_ENTITIES (default) and TYPE_MIXED_ENTITIES.
useBr1 – if you want typograf to add br-s. 0 – otherwise (default)
useP1 – if you want typograf to add p-s. 0 – otherwise (default)
maxNobr(integer) max number of nobr-s. Default 0

Keywords

FAQs

Package last updated on 19 Feb 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc