1.0.3 • Published 1 year ago

@adnen/ispalaindrom v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

isPalaindrom solution (checking to the middel of the string)

install

npm install @adnen/ispalaindrom

Test

npm run test

Usage

// TYPESCRIPT FILE
import  isPalindrome  from "@adnen/ispalaindrom";

const str : string = "racecar";
const result = isPalindrome(str);

console.log(result);
//  true

const strs : sring[] = ['redivider', 'deified', 'civic', 'radar', 'level', 'rotor', 'kayak', 'reviver', 'racecar', 'madam','','a'];
const checkAll =  strs.map(isPlindrom);

console.log(checkAll)
// [true,true,true,true,true,true,true,true,true,true,true,true]