Socket
Socket
Sign inDemoInstall

i-compare-strings

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    i-compare-strings

Constant time string comparison


Version published
Maintainers
1
Install size
3.22 kB
Created

Readme

Source

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)

Keywords

FAQs

Last updated on 28 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc