Skip to content

skpapam/i-compare-strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

i-compare-strings

Constant time string comparison.

Installation

	npm install i-compare-strings -save

Usage

    var icmp = require('i-compare-strings');
    var str1 = "Test this String!";
    var str2 = "test This sTring!";
    var str3 = "Test this String!";
    
    //Case sensitive comparison 
    
    console.log(icmp(str1,str3)) // will output true
    console.log(icmp(str1,str2)) // will output false
    
    //Case insensitive comparison
    
    console.log(icmp(str1,str2,false)) // will output true

LICENSE

MIT

Copyright (c) 2016 Skevos Papamichail <contact@skevosp.me> (www.skevosp.me)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published