
Product
Introducing PHP and Composer Support in Socket
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.
Hypertext and other web-related codecs.
escapeXML(string): string - Replaces XML-unsafe characters with corresponding
predefined XML entities.
escapeHTML(string): string is an alias of escapeXML.
escapeCSS(string): string - Escapes CSS identifier accordingly to the rules defined for CSS.escape()
utility method.
escapeCSSVal(string): string - Escapes CSS value to be included into CSS string.
hyphenateCSS(string): string - Hyphenates camel-cased CSS property name.
Handles ms vendor prefix and caches the results.
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.
decodeURISearchPart(string): string - Decodes part of URI search string, i.e. either search
parameter name or value.
In contrast to standard decodeURIComponent function, this one treats plus signs ("+" (U+002B)) as spaces.
I.e. decodes the same way as URLSearchParams do.
encodeURIPart(string | number | boolean): string - Encodes part of URI.
In contrast to standard encodeURIComponent function, this one follows RFC3869 requirements and percent-encodes all URI reserved characters.
Standard decodeURIComponent function can be used to decode URI.
encodeURISearchPart(string | number | boolean): string - Encodes part of URI search string,
i.e. either search parameter name or value.
In contrast to standard encodeURIComponent function, this one encodes spaces as plus signs "+" (U+002B).
In addition, percent-encodes all URI reserved characters according to RFC3869.
capitalize(string): string - Capitalizes input string.
Converts the first Unicode code point of input string to upper case.
decapitalize(string): string - De-capitalizes input string.
Converts the first Unicode code point of input string to lower case.
hyphenate(string): string - Hyphenates a camel-cased string.
FAQs
Hypertext tongue
The npm package httongue receives a total of 30 weekly downloads. As such, httongue popularity was classified as not popular.
We found that httongue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket now supports PHP with full Composer and Packagist integration, enabling developers to search packages, generate SBOMs, and protect their PHP dependencies from supply chain threats.

Security News
An AI agent is merging PRs into major OSS projects and cold-emailing maintainers to drum up more work.

Research
/Security News
Chrome extension CL Suite by @CLMasters neutralizes 2FA for Facebook and Meta Business accounts while exfiltrating Business Manager contact and analytics data.