mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
32
react-app/node_modules/react/lib/adler32.js
generated
vendored
Normal file
32
react-app/node_modules/react/lib/adler32.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright 2013-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule adler32
|
||||
*/
|
||||
|
||||
/* jslint bitwise:true */
|
||||
|
||||
'use strict';
|
||||
|
||||
var MOD = 65521;
|
||||
|
||||
// This is a clean-room implementation of adler32 designed for detecting
|
||||
// if markup is not what we expect it to be. It does not need to be
|
||||
// cryptographically strong, only reasonably good at detecting if markup
|
||||
// generated on the server is different than that on the client.
|
||||
function adler32(data) {
|
||||
var a = 1;
|
||||
var b = 0;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
a = (a + data.charCodeAt(i)) % MOD;
|
||||
b = (b + a) % MOD;
|
||||
}
|
||||
return a | (b << 16);
|
||||
}
|
||||
|
||||
module.exports = adler32;
|
Reference in New Issue
Block a user