Page MenuHomeSoftware Heritage

utils.js
No OneTemporary

utils.js

/**
* Copyright (C) 2019 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
"use strict";
function getNbPersons(prefix) {
var nbField = document.querySelector(`#${prefix}_nb`);
return parseInt(nbField.value, 10);
}
function setNbPersons(prefix, nb) {
var nbField = document.querySelector(`#${prefix}_nb`);
nbField.value = nb;
}
function setError(msg) {
document.querySelector("#errorMessage").innerHTML = msg;
}
function trimSpaces(s) {
return s.replace(/^\s+|\s+$/g, '');
}

File Metadata

Mime Type
text/plain
Expires
Wed, Jun 4, 7:13 PM (6 d, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3290658

Event Timeline