1.0.3 • Published 4 years ago

@pelevesque/supersubstr v1.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

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

CommandDescription
npm test or npm run testAll Tests Below
npm run coverStandard Style
npm run standardCoverage
npm run unitUnit 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'