aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jquery/src/core/stripAndCollapse.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/jquery/src/core/stripAndCollapse.js')
-rw-r--r--node_modules/jquery/src/core/stripAndCollapse.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/jquery/src/core/stripAndCollapse.js b/node_modules/jquery/src/core/stripAndCollapse.js
new file mode 100644
index 0000000..2b63820
--- /dev/null
+++ b/node_modules/jquery/src/core/stripAndCollapse.js
@@ -0,0 +1,14 @@
+define( [
+ "../var/rnothtmlwhite"
+], function( rnothtmlwhite ) {
+ "use strict";
+
+ // Strip and collapse whitespace according to HTML spec
+ // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
+ function stripAndCollapse( value ) {
+ var tokens = value.match( rnothtmlwhite ) || [];
+ return tokens.join( " " );
+ }
+
+ return stripAndCollapse;
+} );