mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
add missing method invocation
Reviewed By: bestander Differential Revision: D3853357 fbshipit-source-id: 0c10b4162438aa8d670522dd1fe5392eb1e6d62f
This commit is contained in:
parent
157febcd54
commit
178407da40
@ -8,6 +8,8 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/* global Buffer: true */
|
||||
|
||||
const crypto = require('crypto');
|
||||
|
||||
const isUTF8 = encoding => /^utf-?8$/i.test(encoding);
|
||||
@ -15,7 +17,7 @@ const isUTF8 = encoding => /^utf-?8$/i.test(encoding);
|
||||
const constantFor = encoding =>
|
||||
/^ascii$/i.test(encoding) ? 1 :
|
||||
isUTF8(encoding) ? 2 :
|
||||
/^(?:utf-?16(?:le)?|ucs-?2)$/ ? 3 : 0;
|
||||
/^(?:utf-?16(?:le)?|ucs-?2)$/.test(encoding) ? 3 : 0;
|
||||
|
||||
module.exports = function(code, encoding) {
|
||||
const hash = crypto.createHash('sha1');
|
||||
|
Loading…
x
Reference in New Issue
Block a user