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

node-han-css

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-han-css

An unofficial library to use han-css in Node

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-han-css

Build Status NPM version

An unofficial library to use hanzi (漢字標準格式) in Node.

一个非官方的漢字標準格式 Node 库。

Installation / 安装

$ npm install --save node-han-css

Usage / 使用

const Han = require('node-han-css');

const han = new Han();

console.log(han.render('Hello,世界'));
// Hello<h-char unicode="ff0c" class="biaodian cjk bd-end bd-cop bd-jiya bd-hangable"><h-inner>,</h-inner></h-char>世界

console.log(han.render('<em>Hi</em>'));
// <em>Hi</em>

By default, it internally calls render. You may also specify a custom renderer by passing a function to the second parameter.

内部默认调用 render,也可通过第二个参数自定义渲染的方法。

han.render('PHP是世界上……', han => han.renderHWS());
// PHP<h-hws hidden=""> </h-hws>是世界上……

Keywords

FAQs

Package last updated on 22 Feb 2020

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