Skip to content

Commit ec71cab

Browse files
committed
Remove crypto require
Breaks compilation in browsers, and is not needed anyway.
1 parent 234b848 commit ec71cab

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ PouchDB Quick Search
22
=====
33

44
Fork notes:
5+
- Applies https://github.com/leonid-shevtsov/pouchdb-quick-search/commit/9bf91d656a5f9c93ba62beb52831d60b650e1731 Remove crypto dependency
56
- Applies pouchdb-community/pouchdb-quick-search#99 Change md5 dependency
67
- Applies pouchdb-community/pouchdb-quick-search#85 check for pouchdb through global variable
78
- Applies pouchdb-community/pouchdb-quick-search#90 Add lunr.js options when building the index

lib/pouch-utils.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,5 @@ exports.toPromise = function (func) {
7676
exports.inherits = require('inherits');
7777
exports.Promise = Promise;
7878

79-
var crypto = require('crypto');
80-
var md5 = require('md5');
81-
exports.MD5 = function (string) {
82-
/* istanbul ignore if */
83-
if (process.browser) {
84-
return md5(string);
85-
}
86-
return crypto.createHash('md5').update(string).digest('hex');
87-
};
88-
79+
exports.MD5 = require("md5");
8980
exports.extend = require('pouchdb-extend');

0 commit comments

Comments
 (0)