npm.io
1.0.3 • Published 6 years ago

@pelevesque/supersubstr

Licence
MIT
Version
1.0.3
Deps
3
Size
8 kB
Vulns
0
Weekly
0

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'

Keywords