Comparing version 1.0.1 to 1.0.2
@@ -14,5 +14,7 @@ 'use strict' | ||
options = { encoding: options } | ||
} else { | ||
throw new TypeError('Punc: expected options to be either an object or a string, ' + | ||
'but got ' + typeof options + ' instead'); | ||
} else if (typeof options !== 'object') { | ||
throw new TypeError( | ||
'Punc: expected options to be either an object or a \ | ||
string, ' + 'but got ' + typeof options + ' instead' | ||
) | ||
} | ||
@@ -19,0 +21,0 @@ |
{ | ||
"name": "punc", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,3 +0,1 @@ | ||
<!-- intro --> | ||
# Punc | ||
@@ -11,2 +9,5 @@ ![image](https://cloud.githubusercontent.com/assets/3915598/13369726/783be3d0-dc9c-11e5-846a-5f1ec6517966.png) | ||
## Usage | ||
Please see the [wiki][WIKI]. | ||
## Notes | ||
@@ -21,4 +22,2 @@ - Punctuations to keep when removing words: | ||
<!-- footer --> | ||
### Inspiration | ||
@@ -36,2 +35,4 @@ *inspired by [this article][1] on medium which was in-turn inspired by [this article][2]* | ||
[LICENSE]: https://github.com/sgnl/punc/blob/master/LICENSE | ||
[WIKI]: https://github.com/sgnl/punc/wiki/Usage | ||
[LICENSE]: https://github.com/sgnl/punc/blob/master/LICENSE |
'use strict' | ||
const Punc = require('punc') | ||
const Punc = require('./index') | ||
Punc('alice.txt', 'utf8') | ||
.then(book => { | ||
console.log(book.count) // { ';': 194, ':': 233, '\'': 2869, '"': 113, ',': 2418, '!': 450, '?': 202, '.': 981, '(': 56, ')': 56, '-': 665 } | ||
console.log(book.body) // | ||
console.log(book.count) | ||
console.log(book.body) | ||
}) | ||
@@ -10,0 +10,0 @@ .catch(error => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68
36
148233