Check if a string is inside another string but not on the edge.
npm install inside-string
const insideString = require("inside-string");
insideString("abc", "a");
//=> false
insideString("abc", "b");
//=> true
insideString("abc", "c");
//=> false
insideString("abcdef", "c", 2); // Setting edge to 2
//=> true
insideString("abcdef", "e", 2, 1); // Setting left edge to 2 and right edge to 1
//=> true
Type: string
The string to search.
Type: string
The string to check for.
Type: number
Default: 1
The amount of characters inwards from the left and right edges of the string to search.
Type: string
The string to search.
Type: string
The string to check for.
Type: number
Default: 1
The amount of characters inward from the left edge of the string to search.
Type: number
Default: leftSide
The amount of characters inward from the right edge of the string to search.