Skip to content

Commit

Permalink
Remove xo rule
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 25, 2021
1 parent c51c134 commit 2c2d579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {trigram} from 'n-gram'
import {collapseWhiteSpace} from 'collapse-white-space'

var own = {}.hasOwnProperty

/**
* @typedef {[string, number]} TrigramTuple
* @typedef {TrigramTuple[]} TrigramTuples
* @typedef {Object.<string, number>} TrigramDictionary
*/

var own = {}.hasOwnProperty

/**
* Clean `value`.
* Removed general non-important (as in, for language detection) punctuation
Expand Down Expand Up @@ -75,7 +75,9 @@ export function asTuples(value) {
var trigram

for (trigram in dictionary) {
tuples.push([trigram, dictionary[trigram]])
if (own.call(dictionary, trigram)) {
tuples.push([trigram, dictionary[trigram]])
}
}

tuples.sort(sort)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"xo": {
"prettier": true,
"rules": {
"guard-for-in": "off",
"no-var": "off",
"prefer-arrow-callback": "off"
}
Expand Down

0 comments on commit 2c2d579

Please sign in to comment.