Path: blob/trunk/third_party/closure/goog/net/streams/utils.js
1865 views
// Copyright 2016 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314goog.module('goog.net.streams.utils');151617/**18* Returns whether a character is whitespace in the context of parsing JSON19* stream.20*21* TODO(user): 0xa0 for IE?22*23* @param {string} c The char to check24* @return {boolean} true if a char is a whitespace25*/26exports.isJsonWhitespace = function(c) {27return c == '\r' || c == '\n' || c == ' ' || c == '\t';28};293031