Socket
Socket
Sign inDemoInstall

@akcybex/jstr

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@akcybex/jstr

`@akcybex/jsr` is a JavaScript library for fluent string manipulation, providing a chainable API for common string operations.


Version published
Maintainers
3
Created
Source

@akcybex/jsr

@akcybex/jsr is a JavaScript library for fluent string manipulation, providing a chainable API for common string operations.

Installation

Using npm

You can install @akcybex/jsr using npm:

npm install @akcybex/jsr

Using Yarn

Alternatively, you can use Yarn to add the package:

yarn add @akcybex/jsr

Usage in Node.js

After installing, you can use @akcybex/jsr in your Node.js application:

import { jstr } from '@akcybex/jsr';

const result = jstr('hello').repeat(3).upper().toString();
console.log(result); // Outputs: 'HELLOHELLOHELLO'

Usage with CDN

For browser-based projects, you can use the CDN link:

<script src="https://cdn.example.com/@akcybex/jsr"></script>

After including the script, jstr will be available globally:

<script>
    const result = jstr('hello').repeat(3).upper().toString();
    console.log(result); // Outputs: 'HELLOHELLOHELLO'
</script>

Examples

Here are some examples of using @akcybex/jsr:

Repeating a String

const repeated = jstr('a').repeat(5).toString();
console.log(repeated); // Outputs: 'aaaaa'

Converting to Uppercase

const upper = jstr('hello').upper().toString();
console.log(upper); // Outputs: 'HELLO'

Converting to Lowercase

const lower = jstr('HELLO').lower().toString();
console.log(lower); // Outputs: 'hello'

Capitalizing Each Word

const capitalized = jstr('hello world').capitalize().toString();
console.log(capitalized); // Outputs: 'Hello World'

Contributing

Contributions to @akcybex/jsr are welcome. Please refer to the contributing guidelines for more information.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 15 Dec 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc