@pelevesque/supersubstr

1.0.3 • Public • Published

Build Status Coverage Status JavaScript Style Guide

supersubstr

Like Javascript's substr, but with wrapping and reversed substrings.

Node Repository

https://www.npmjs.com/package/@pelevesque/supersubstr

Installation

npm install @pelevesque/supersubstr

Tests

Command Description
npm test or npm run test All Tests Below
npm run cover Standard Style
npm run standard Coverage
npm run unit Unit Tests

Usage

Parameters

str     (required)
options (optional) default = { startIndex = 0, length, reverse = false }

Examples

const supersubstr = require('@pelevesque/supersubstr')
const str = '12345'
const result = supersubstr(str, { startIndex: 1 })
// result === '2345'
const str = '12345'
const result = supersubstr(str, { startIndex: 2, length: 10, reverse: true })
// result === '3215432154'

/@pelevesque/supersubstr/

    Package Sidebar

    Install

    npm i @pelevesque/supersubstr

    Weekly Downloads

    10

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    7.76 kB

    Total Files

    6

    Last publish

    Collaborators

    • pelevesque