Socket
Socket
Sign inDemoInstall

@chopinlang/string-utils

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @chopinlang/string-utils

String manipulation and processing functions


Version published
Weekly downloads
42
increased by55.56%
Maintainers
1
Install size
252 kB
Created
Weekly downloads
 

Readme

Source

Chopin String Utilities

Chopin String Utilities offers a wide range of string processing and manipulation functions to handle a wide variety of text wrangling tasks. The library is the backbone of the Chopin Programming Language's String type, but it is also perfectly suitable for use in other projects.

Installation

npm install @chopinlang/string-utils

Usage

You can use the ES2015 import statement to include the package:

import * as su from "@chopinlang/string-utils";

Or if you need CommonJS you can require it:

const su = require("@chopinlang/string-utils");

Or simply import the individual functions you need:

// ES2015 import
import { camelCase, decodeUTF8, graphemes } from "@chopinlang/string-utils";

// CommonJS
const {
  camelCase,
  decodeUTF8,
  graphemes,
} = require("@chopinlang/string-utils");

Then simply call library functions as methods on the su object:

camelcase("++this-__is-spartaaaaa++");
// => "thisIsSpartaaaaa"

graphemes("अनुच्छेद");
// => ["अ", "नु", "च्", "छे", "द"]

decodeUTF8([0xf0, 0x9f, 0x98, 0x80, 0xf0, 0x9f, 0x98, 0x81]);
// => "😀😁"

Complete API documentation

Keywords

FAQs

Last updated on 01 May 2021

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