bjarneo / is-anagram

Check if two words or phrases are anagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is anagram

Travis

What is this?

This package will check if two words / strings are anagrams. https://en.wikipedia.org/wiki/Anagram

Installation

It's available on npm.

npm install --save is-anagram

Usage

const isAnagram = require('is-anagram');

isAnagram('silent', 'listen')           // true
isAnagram('rail safety', 'fairy tales') // true
isAnagram('silent', 'lamb')             // false
isAnagram('silent', [])                 // false

Test

$ npm test

Contribution

Contributions are appreciated.

License

MIT licensed. See LICENSE.

About

Check if two words or phrases are anagrams

License:MIT License


Languages

Language:JavaScript 100.0%