Sha256: 2e0b00d528a7affca4402f37ef7b1c0672c711a6f083988d6fa09967aaa555b8

Contents?: true

Size: 1.03 KB

Versions: 23

Compression:

Stored size: 1.03 KB

Contents

import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/inherits";
// Published as 'yaml/scalar'
import _toJSON from '../toJSON';
import Node from './Node';

var Scalar = /*#__PURE__*/function (_Node) {
  _inherits(Scalar, _Node);

  function Scalar(value) {
    var _this;

    _classCallCheck(this, Scalar);

    _this = _possibleConstructorReturn(this, _getPrototypeOf(Scalar).call(this));
    _this.value = value;
    return _this;
  }

  _createClass(Scalar, [{
    key: "toJSON",
    value: function toJSON(arg, ctx) {
      return ctx && ctx.keep ? this.value : _toJSON(this.value, arg, ctx);
    }
  }, {
    key: "toString",
    value: function toString() {
      return String(this.value);
    }
  }]);

  return Scalar;
}(Node);

export { Scalar as default };

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-cms-5.0.7 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.6 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.5 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.4 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.3 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.2 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.1 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3.5 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-5.0.0 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3.4 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3.3 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3.2 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3.1 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.3 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.2.3 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.2.2 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.2.1 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.2 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.1.9 node_modules/yaml/browser/dist/schema/Scalar.js
trusty-cms-4.1.8 node_modules/yaml/browser/dist/schema/Scalar.js