get-string-details.js 376 B

123456789101112131415161718
  1. "use strict";
  2. /*
  3. Copyright 2018 Google LLC
  4. Use of this source code is governed by an MIT-style
  5. license that can be found in the LICENSE file or at
  6. https://opensource.org/licenses/MIT.
  7. */
  8. const getStringHash = require('./get-string-hash');
  9. module.exports = (url, string) => {
  10. return {
  11. file: url,
  12. hash: getStringHash(string),
  13. size: string.length
  14. };
  15. };