Socket
Book a DemoInstallSign in
Socket

httongue

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httongue

Hypertext tongue

latest
Source
npmnpm
Version
3.1.0
Version published
Maintainers
1
Created
Source

Hypertext Tongue

NPM Build Status Code Quality Coverage GitHub Project API Documentation

Hypertext and other web-related codecs.

HTML and XML

CSS

JavaScript

  • escapeJsString(string): string - Escapes a string to be included into JavaScript string literal.

    Handles all kinds of quotes (', ", and ```) and special chars. Converts non-ASCII chars to corresponding Unicode escapes.

  • jsPropertyAccessor(string, quote?): string - Creates JavaScript property accessor expression.

    If accessed property key is valid JavaScript identifier, then creates a .${key} accessor. Otherwise, creates an accessor like ['${key}'] with key properly quoted.

  • jsStringLiteral(string, quote?): string - Creates JavaScript string literal.

    Encloses the string into quotes and properly escapes it.

  • quoteJsKey(string, quote?): string - Conditionally quotes JavaScript key.

    If the given key is valid JavaScript identifier, then leaves it as is. Otherwise, encloses it into quotes and properly escapes if necessary.

URI

Other

Keywords

css-escape

FAQs

Package last updated on 26 May 2023

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