Tabnine Logo For Javascript
load
Code IndexAdd Tabnine to your IDE (free)

How to use
load
function
in
js-yaml

Best JavaScript code snippets using js-yaml.load(Showing top 7 results out of 315)

origin: lando/lando

load(data) {
  return yaml.load(data, {schema: this.PLATFORM_SCHEMA});
 }
origin: claylo/yaml-include

function construct(data) {
 var src, included, basepath, fullpath;

 basepath = yamlinc.getBasePath();
 fullpath = p.join(basepath, data);

 yamlinc.YAML_VISITED_FILES.push(fullpath.replace(basepath + p.sep, ''));
 debug('resolved %s', fullpath);
 debug('incoming data %s', data);

 src = fs.readFileSync(fullpath, 'utf8');
 included = yaml.load(src, {
  schema: yamlinc.YAML_INCLUDE_SCHEMA,
  filename: fullpath
 });

 return included;
}
origin: OpenTesseract/aletheia

start() {
    const conf = yaml.load(fs.readFileSync("./config.yaml", "utf8"));
    conf.services.forEach(service => {
      const app = require(`../${service.module}`);
      app(service);
    });
  }
origin: azigler/pinwheel

/**
  * Read in and parse a file. Current supports yaml and json
  * @param {string} filepath
  * @return {*} parsed contents of file
  */
 static parseFile(filepath) {
  if (!fs.existsSync(filepath)) {
   throw new Error(`File [${filepath}] does not exist!`);
  }

  const contents = fs.readFileSync(fs.realpathSync(filepath)).toString('utf8');
  const parsers = {
   '.yml': yaml.load,
   '.yaml': yaml.load,
   '.json': JSON.parse,
  };

  const ext = path.extname(filepath);
  if (!(ext in parsers)) {
   throw new Error(`File [${filepath}] does not have a valid parser!`);
  }

  return parsers[ext](contents);
 }
origin: wikimedia/service-runner

} else if (conf && typeof conf === 'string') {
  action = P.try(() => yaml.load(this._replaceEnvVars(conf)));
} else {
  .then((yamlSource) => yaml.load(this._replaceEnvVars(yamlSource)));
origin: claylo/yaml-include

if (src.length > 0) {
 yamlinc.YAML_VISITED_FILES.push(filepath);
 included = yaml.load(src, {
  schema: yamlinc.YAML_INCLUDE_SCHEMA,
  filename: filepath
origin: qiujun8023/ss-panel-server

let loadYaml = (fileName) => {
 return yaml.load(fs.readFileSync(fileName, 'utf8'))
}
js-yaml(npm)load

Most used js-yaml functions

  • safeLoad
  • safeDump
  • dump
  • YAMLException
  • JSON_SCHEMA
  • Schema.create,
  • Type,
  • default,
  • safeLoadAll

Popular in JavaScript

  • express
    Fast, unopinionated, minimalist web framework
  • mocha
    simple, flexible, fun test framework
  • crypto
  • mkdirp
    Recursively mkdir, like `mkdir -p`
  • http
  • debug
    small debugging utility
  • winston
    A logger for just about everything.
  • commander
    the complete solution for node.js command-line programs
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now