Socket
Socket
Sign inDemoInstall

@mojojs/util

Package Overview
Dependencies
0
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @mojojs/util

Utilities for mojo.js packages


Version published
Weekly downloads
565
increased by53.12%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

Coverage Status npm

Just a bunch of utility functions and classes shared by mojo.js packages.

import {SafeString, escapeRegExp, xmlEscape, xmlUnescape} from '@mojojs/util';

// "te\*s\?t"
const str = escapeRegExp('te*s?t');

// "<p>"
const str = xmlEscape('<p>');

// "<p>"
const str = xmlEscape(new SafeString('<p>'));

// "<p>"
const str = xmlUnescape('&lt;p&gt;&apos;');

Installation

All you need is Node.js 16.0.0 (or newer).

$ npm install @mojojs/util

Support

If you have any questions the documentation might not yet answer, don't hesitate to ask in the Forum, on Matrix, or IRC.

Keywords

FAQs

Last updated on 20 Oct 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc