/is-anagram

Check if two words or phrases are anagrams

Primary LanguageJavaScriptMIT LicenseMIT

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.