Namespace pjs.hashFunctions
- Defined in:
- pjscrape.js
Hash function namespace. You can add new hash functions here; hash functions should take an item and return a unique (or unique-enough) string.
// create a new hash function pjs.hashFunctions.myHash = function(item) { return item.mySpecialUID; }; // tell pjscrape to ignore dupes pjs.config({ ignoreDuplicates: true }); // tell pjscrape to use your hash function pjs.addScraper({ hashFunction: 'myHash', // etc });
Static Fields
Field | |
---|---|
pjs.hashFunctions.id
:{HashFunction}
UID hash - assumes item.id; falls back on md5
|
|
pjs.hashFunctions.md5
:{HashFunction}
md5 hash - collisions are possible
|
Static Field Details
pjs.hashFunctions.id
:{HashFunction}
UID hash - assumes item.id; falls back on md5
pjs.hashFunctions.md5
:{HashFunction}
md5 hash - collisions are possible
©2011 Nick Rabinowitz
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Oct 24 2011 12:16:49 GMT-0700 (PDT)
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Oct 24 2011 12:16:49 GMT-0700 (PDT)