Skip to content

Commit

Permalink
Browser files rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaly Puzrin committed Jul 8, 2017
1 parent 561891c commit 1b45ecc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
32 changes: 20 additions & 12 deletions dist/js-yaml.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* js-yaml 3.8.4 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/* js-yaml 3.9.0 https://github.com/nodeca/js-yaml */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jsyaml = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';


Expand Down Expand Up @@ -217,6 +217,7 @@ function State(options) {
this.lineWidth = options['lineWidth'] || 80;
this.noRefs = options['noRefs'] || false;
this.noCompatMode = options['noCompatMode'] || false;
this.condenseFlow = options['condenseFlow'] || false;

this.implicitTypes = this.schema.compiledImplicit;
this.explicitTypes = this.schema.compiledExplicit;
Expand Down Expand Up @@ -586,7 +587,7 @@ function writeFlowSequence(state, level, object) {
for (index = 0, length = object.length; index < length; index += 1) {
// Write only valid elements.
if (writeNode(state, level, object[index], false, false)) {
if (index !== 0) _result += ', ';
if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');
_result += state.dump;
}
}
Expand Down Expand Up @@ -646,7 +647,7 @@ function writeFlowMapping(state, level, object) {

if (state.dump.length > 1024) pairBuffer += '? ';

pairBuffer += state.dump + ': ';
pairBuffer += state.dump + ':' + (state.condenseFlow ? '' : ' ');

if (!writeNode(state, level, objectValue, false, false)) {
continue; // Skip this pair because of invalid value.
Expand Down Expand Up @@ -1044,6 +1045,7 @@ function fromDecimalCode(c) {
}

function simpleEscapeSequence(c) {
/* eslint-disable indent */
return (c === 0x30/* 0 */) ? '\x00' :
(c === 0x61/* a */) ? '\x07' :
(c === 0x62/* b */) ? '\x08' :
Expand All @@ -1070,8 +1072,10 @@ function charFromCodepoint(c) {
}
// Encode UTF-16 surrogate pair
// https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800,
((c - 0x010000) & 0x03FF) + 0xDC00);
return String.fromCharCode(
((c - 0x010000) >> 10) + 0xD800,
((c - 0x010000) & 0x03FF) + 0xDC00
);
}

var simpleEscapeCheck = new Array(256); // integer, for fast access
Expand Down Expand Up @@ -1203,9 +1207,7 @@ function captureSegment(state, start, end, checkJson) {
_result = state.input.slice(start, end);

if (checkJson) {
for (_position = 0, _length = _result.length;
_position < _length;
_position += 1) {
for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
_character = _result.charCodeAt(_position);
if (!(_character === 0x09 ||
(0x20 <= _character && _character <= 0x10FFFF))) {
Expand Down Expand Up @@ -2323,9 +2325,7 @@ function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact

if (state.tag !== null && state.tag !== '!') {
if (state.tag === '?') {
for (typeIndex = 0, typeQuantity = state.implicitTypes.length;
typeIndex < typeQuantity;
typeIndex += 1) {
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
type = state.implicitTypes[typeIndex];

// Implicit resolving is not allowed for non-scalar types, and '?'
Expand Down Expand Up @@ -2514,6 +2514,10 @@ function loadDocuments(input, options) {
function loadAll(input, iterator, options) {
var documents = loadDocuments(input, options), index, length;

if (typeof iterator !== 'function') {
return documents;
}

for (index = 0, length = documents.length; index < length; index += 1) {
iterator(documents[index]);
}
Expand All @@ -2534,7 +2538,11 @@ function load(input, options) {


function safeLoadAll(input, output, options) {
loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
if (typeof output === 'function') {
loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
} else {
return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
}
}


Expand Down
Loading

0 comments on commit 1b45ecc

Please sign in to comment.