trie-prefix-tree
Advanced tools
Comparing version 1.0.5 to 1.1.0
@@ -27,2 +27,3 @@ 'use strict'; | ||
return trie; | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -27,2 +27,3 @@ 'use strict'; | ||
}; | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -9,2 +9,3 @@ 'use strict'; | ||
PERMS_MIN_LEN: 2 | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -29,2 +29,3 @@ 'use strict'; | ||
return trie; | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -216,2 +216,3 @@ 'use strict'; | ||
; | ||
; | ||
module.exports = exports['default']; |
@@ -32,3 +32,3 @@ 'use strict'; | ||
var wordIsEmpty = word.length === 0; | ||
var wordFound = words.includes(prefix); | ||
var wordFound = words.indexOf(prefix) !== -1; | ||
var endWordFound = node[_config2.default.END_WORD] === 1; | ||
@@ -44,3 +44,3 @@ | ||
if (opts.type === 'sub-anagram') { | ||
if (endWordFound && !words.includes(prefix)) { | ||
if (endWordFound && !(words.indexOf(prefix) !== -1)) { | ||
words.push(prefix); | ||
@@ -60,2 +60,3 @@ } | ||
return permute(letters, trie); | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -28,2 +28,3 @@ 'use strict'; | ||
return prefixes.sort(); | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -21,2 +21,3 @@ 'use strict'; | ||
} | ||
}; | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "trie-prefix-tree", | ||
"version": "1.0.5", | ||
"version": "1.1.0", | ||
"description": "Create and modify trie prefix structures, extract word lists including anagrams and sub-anagrams", | ||
@@ -10,10 +10,12 @@ "main": "dist/index.js", | ||
"lint": "eslint src", | ||
"jest": "jest", | ||
"jest:coverage": "jest --coverage", | ||
"jest:watch": "jest --watch", | ||
"test": "npm run lint && npm run jest" | ||
"report-coverage": "codecov", | ||
"test": "jest", | ||
"test-coverage": "jest --coverage", | ||
"test-watch": "jest --watch", | ||
"commit": "git-cz", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/lyndseybrowning/trie-prefix-tree" | ||
"url": "https://github.com/lyndseybrowning/trie-prefix-tree" | ||
}, | ||
@@ -38,8 +40,37 @@ "keywords": [ | ||
"babel-core": "^6.22.1", | ||
"babel-jest": "18.0.0", | ||
"babel-plugin-add-module-exports": "0.2.1", | ||
"babel-plugin-array-includes": "2.0.3", | ||
"babel-plugin-transform-object-rest-spread": "^6.22.0", | ||
"babel-preset-env": "1.1.8", | ||
"babel-preset-es2015": "^6.22.0", | ||
"codecov": "1.0.1", | ||
"commitizen": "2.9.6", | ||
"cz-conventional-changelog": "1.2.0", | ||
"eslint": "^3.15.0", | ||
"ghooks": "2.0.0", | ||
"jest": "^18.1.0", | ||
"rimraf": "^2.5.4" | ||
"rimraf": "^2.5.4", | ||
"semantic-release": "^6.3.2" | ||
}, | ||
"jest": { | ||
"coverageDirectory": "./coverage", | ||
"collectCoverage": true, | ||
"transform": { | ||
".*": "<rootDir>/node_modules/babel-jest" | ||
}, | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"es6" | ||
] | ||
}, | ||
"czConfig": { | ||
"path": "node_modules/cz-conventional-changelog" | ||
}, | ||
"config": { | ||
"ghooks": { | ||
"pre-commit": "npm run lint && npm run test" | ||
} | ||
} | ||
} | ||
} |
# Trie Prefix Tree | ||
[![Travis Build](https://img.shields.io/travis/lyndseybrowning/trie-prefix-tree.svg?style=flat-square)](https://travis-ci.org/lyndseybrowning/trie-prefix-tree) | ||
[![codecov coverage](https://img.shields.io/codecov/c/github/lyndseybrowning/trie-prefix-tree.svg?style=flat-square)](https://codecov.io/github/lyndseybrowning/trie-prefix-tree) | ||
[![version](https://img.shields.io/npm/v/trie-prefix-tree.svg?style=flat-square)](http://npm.im/starwars-names) | ||
[![downloads](https://img.shields.io/npm/dm/trie-prefix-tree.svg?style=flat-square)](http://npm-stat.com/charts.html?package=trie-prefix-tree&from=2015-08-01) | ||
[![MIT License](https://img.shields.io/npm/l/trie-prefix-tree.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) |
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
14504
301
9
16