How to use the js-yaml/lib/js-yaml.js.load function in js-yaml

To help you get started, we’ve selected a few js-yaml examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JimmyLv / nobackend.website / app / components / jekyll / posts.js View on Github external
$http.get(postItem.url).then(function (res) {
                    var rawPost = res.data;
                    var decodedContent = base64.decode(rawPost.content);
                    rawPost.editUrl = rawPost.html_url.replace('blob', 'edit');
                    rawPost.content = decodedContent.split('---')[2];
                    rawPost.myHTML = marked(rawPost.content);
                    rawPost.meta = jsyaml.load(decodedContent.split('---')[1]);
                    postItem.postContent = rawPost;
                  }
                )
github JimmyLv / nobackend.website / src / angular / features / note / aside3 / aside3.js View on Github external
function _parseContent(separator, rawContent) {
      const splitResult = rawContent.split(separator);
      return {
        matter: jsyaml.load(splitResult[1]),
        content: splitResult.slice(2).join(separator)
      }
    }
  }
github JimmyLv / nobackend.website / src / angular / index.js View on Github external
function (response) {
      angular.module('config', []).constant('CONFIG', jsyaml.load(response.data));
      angular.element(document).ready(function () {
        angular.module('app', [
          ngAnimate,
          ngFx,
          ngSanitize,
          ngCache,
          ngMarked,
          ngDisqus,
          ngLoadingBar,
          angulartics,
          'angulartics.google.analytics',
          '720kb.socialshare',
          'ja.qr',
          'ngAudio',
          'ngUiAwesome',
          Configs.name,