insight-ui-excc
Version:
An open-source frontend for the Insight API compatible with Exchangecoin. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the Exchangecoin network and build your own services with it.
15 lines (12 loc) • 384 B
JavaScript
define( [
"../var/rnothtmlwhite"
], function( rnothtmlwhite ) {
"use strict";
// Strip and collapse whitespace according to HTML spec
// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
function stripAndCollapse( value ) {
var tokens = value.match( rnothtmlwhite ) || [];
return tokens.join( " " );
}
return stripAndCollapse;
} );