Skip to content

Commit

Permalink
README fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
James Calfee committed Sep 21, 2017
1 parent f9baa05 commit 76c4823
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[![NPM](https://img.shields.io/npm/v/bip39-checker.svg)](https://www.npmjs.org/package/bip39-checker)
[![Build Status](https://travis-ci.org/jcalfee/bip39-checker.svg?branch=master)](https://travis-ci.org/jcalfee/bip39-checker)
[![Coverage Status](https://coveralls.io/repos/github/jcalfee/bip39-checker/badge.svg?branch=master)](https://coveralls.io/github/jcalfee/bip39-checker?branch=master)

[NPM Package](https://www.npmjs.com/package/bip39-checker)

# BIP-0039 Checker

Normalize and spell check BIP-0039 brain seed phrases.
Expand All @@ -13,15 +12,16 @@ Interfaces may gather word suggestions from this package and use them for auto-c

```javascript
const assert = require('assert')
const {normalize, validSeed, suggest} = require('bip39-checker')
const {normalize, checkWords, suggest} = require('bip39-checker')

// Normalizes
assert.equal('double spaces', normalize('double spaces'), 'removes extra spaces')
assert.equal('lowercase', normalize('Lowercase'), 'lowercase')
assert.equal('trim', normalize(' trim '), 'trim')

const seed = 'ocean earn race rack swing odor yard manage illegal draw window desk'
assert(validSeed(seed, 'english').valid)
// Checks each word in the seed
assert(checkWords('lazy dog', 'english'))
assert(!checkWords('lazy ogday', 'english'))

// Auto-correct suggestions
assert(suggest('quality') === true)
Expand Down

0 comments on commit 76c4823

Please sign in to comment.