Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@spare/bracket

Package Overview
Dependencies
1
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @spare/bracket

Add parenthesis/bracket/brace/angle-bracket to string


Version published
Weekly downloads
143
decreased by-11.18%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

@spare/quote

A function returning string length, s.t. skipping ansi (escape) codes, correcting length of astral symbols.

npm version npm quality npm download npm total-download size github commit activity npm license

Features

  • ES2015 syntax

Install

$ npm install @spare/quote

Usage

import { quote } from '@spare/quote'
const list = [
  'tolstoy',
  '\u001b[3;4;31mhatsu\u001b[0m',
  '\u{1F3C3}2\u{1F525}7',
]
for (let tx of list) {
  console.log(`[${tx}] [length] (${tx.length}) [quote] (${quote(tx)})`)
}

Meta

LICENSE (MIT)

Copyright (c) 2019-present, Haoyang (Vincent) Wang

Keywords

FAQs

Last updated on 09 Jan 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