Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getNamespace( fetchOptions ) {
return deterministicStringify( omit( fetchOptions, [ 'page', 'max' ] ) );
}
render() {
const key = deterministicStringify( omit( this.props.fetchOptions, [ 'number', 'offset' ] ) ),
listClass = classNames( {
'bulk-editing': this.state.bulkEditing,
'people-invites__invites-list': true,
} );
let people;
let headerText;
if ( this.props.totalUsers ) {
headerText = this.props.translate(
'There is %(numberPeople)d person in your team',
'There are %(numberPeople)d people in your team',
{
args: {
numberPeople: this.props.totalUsers,
},
count: this.props.totalUsers,
context: 'A navigation label.',
export function getSerializedQuery( query ) {
return deterministicStringify( omit( query, [ 'page', 'max' ] ) );
}
function ensureFeatureID(feature) {
if (!feature) return;
feature.__featurehash__ = utilHashcode(stringify(feature));
return feature;
}
export function getValidationErrors(schema: any, data: any): ErrorObject[] {
let validationErrors: ErrorObject[] = [];
if (!!!validateData(schema, data)) {
const schemaRefKey: string = stringify(schema);
validateFunctionDictionary[schemaRefKey](data);
validationErrors = validateFunctionDictionary[schemaRefKey].errors;
}
return validationErrors;
}
function ensureFeatureID(feature) {
if (!feature) return;
feature.__featurehash__ = utilHashcode(stringify(feature));
return feature;
}
function ensureFeatureID(feature) {
if (!feature) return;
feature.__featurehash__ = utilHashcode(stringify(feature));
return feature;
}
export function getHash(obj: any): string {
const json = stringify(obj);
let sha = sha256();
sha.update(json);
return sha.digest('hex');
}