Comparing version 2.3.3 to 2.3.4
# Changelog | ||
## 2.3.4 | ||
* Ensure that [inverted index is prototype-less](https://github.com/olivernn/lunr.js/pull/378) after serialization, thanks [Rob Hoelz](https://github.com/hoelzro). | ||
## 2.3.3 | ||
@@ -4,0 +8,0 @@ |
@@ -456,3 +456,3 @@ /*! | ||
serializedVectors = serializedIndex.fieldVectors, | ||
invertedIndex = {}, | ||
invertedIndex = Object.create(null), | ||
serializedInvertedIndex = serializedIndex.invertedIndex, | ||
@@ -459,0 +459,0 @@ tokenSetBuilder = new lunr.TokenSet.Builder, |
{ | ||
"name": "lunr", | ||
"description": "Simple full-text search in your browser.", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"author": "Oliver Nightingale", | ||
@@ -6,0 +6,0 @@ "keywords": ["search"], |
@@ -18,2 +18,7 @@ suite('serialization', function () { | ||
wordCount: 16 | ||
},{ | ||
id: 'd', | ||
title: 'All about JavaScript', | ||
body: 'JavaScript objects have a special __proto__ property', | ||
wordCount: 7 | ||
}] | ||
@@ -41,2 +46,10 @@ | ||
}) | ||
test('__proto__ double serialization', function () { | ||
var doubleLoadedIdx = lunr.Index.load(JSON.parse(JSON.stringify(this.loadedIdx))), | ||
idxResults = this.idx.search('__proto__'), | ||
doubleSerializedResults = doubleLoadedIdx.search('__proto__') | ||
assert.deepEqual(idxResults, doubleSerializedResults) | ||
}) | ||
}) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
943572
28607