14 15 16 17 18
# File 'opal/stdlib/nodejs/yaml.rb', line 14 def self.load(data) loaded = `__yaml__.safeLoad(data)` loaded = Hash.new(loaded) if native?(loaded) loaded end
10 11 12
# File 'opal/stdlib/nodejs/yaml.rb', line 10 def self.load_path(path) load(`#{File}.__fs__.readFileSync(#{path}, 'utf8')`) end