i-compare-strings

1.0.1 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i i-compare-strings

Weekly Downloads

2

Version

1.0.1

License

MIT

Last publish

Collaborators

  • skpapam