How to use fast-json-stable-stringify - 8 common examples

To help you get started, we’ve selected a few fast-json-stable-stringify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Automattic / wp-calypso / client / lib / email-followers / store.js View on Github external
function getNamespace( fetchOptions ) {
	return deterministicStringify( omit( fetchOptions, [ 'page', 'max' ] ) );
}
github Automattic / wp-calypso / client / my-sites / people / team-list / team.jsx View on Github external
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.',
github Automattic / wp-calypso / client / state / followers / utils.js View on Github external
export function getSerializedQuery( query ) {
	return deterministicStringify( omit( query, [ 'page', 'max' ] ) );
}
github openstreetmap / iD / modules / svg / tasking.js View on Github external
function ensureFeatureID(feature) {
        if (!feature) return;
        feature.__featurehash__ = utilHashcode(stringify(feature));
        return feature;
    }
github microsoft / fast-dna / packages / fast-tooling-react / src / utilities / ajv-validation.ts View on Github external
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;
}
github openstreetmap / iD / modules / svg / data.js View on Github external
function ensureFeatureID(feature) {
        if (!feature) return;
        feature.__featurehash__ = utilHashcode(stringify(feature));
        return feature;
    }
github openstreetmap / iD / modules / services / tasking / tasking.js View on Github external
function ensureFeatureID(feature) {
    if (!feature) return;
    feature.__featurehash__ = utilHashcode(stringify(feature));
    return feature;
}
github casual-simulation / aux / src / crypto / HashHelpers.ts View on Github external
export function getHash(obj: any): string {
    const json = stringify(obj);
    let sha = sha256();
    sha.update(json);
    return sha.digest('hex');
}

fast-json-stable-stringify

deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify

MIT
Latest version published 5 years ago

Package Health Score

67 / 100
Full package analysis

Popular fast-json-stable-stringify functions