Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@mojojs/util

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mojojs/util

Utilities for mojo.js packages

latest
Source
npmnpm
Version
1.6.7
Version published
Weekly downloads
882
36.74%
Maintainers
4
Weekly downloads
 
Created
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

mojojs

FAQs

Package last updated on 20 Oct 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