0.0.8 • Published 4 years ago

@pelevesque/is-offset v0.0.8

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

Build Status Coverage Status JavaScript Style Guide

is-offset

Checks if a string is the offset of another.

Node Repository

https://www.npmjs.com/package/@pelevesque/is-offset

Installation

npm install @pelevesque/is-offset

Tests

CommandDescription
npm test or npm run testAll Tests Below
npm run coverStandard Style
npm run standardCoverage
npm run unitUnit Tests

Usage

Parameters

str1 (required)  
str2 (required)   
step (optional) default = 1

Examples

const isOffset = require('@pelevesque/is-offset')
const str1 = 'abcd'
const str2 = 'efgh'
const result = isOffset(str1, str2)
// result === false
const str1 = 'abcd'
const str2 = 'bcda'
const result = isOffset(str1, str2)
// result === true
const str1 = '111222333444'
const str2 = '333444111222'
const step = 3
const result = isOffset(str1, str2, step)
// result === true
0.0.8

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago