js-yaml-js-types-esm

1.0.0 • Public • Published

js-yaml-js-types-esm

NPM version

This package is a fork of js-yaml-js-types that adds support for ES modules. It provides extra types for js-yaml:

js-yaml extra types:

  • !!js/regexp /pattern/gim
  • !!js/undefined ''
  • !!js/function 'function () {...}'

Installation

npm install js-yaml-js-types-esm

Usage

import import yaml from "js-yaml";
import { all as unsafe } from "js-yaml-js-types";

const schema = yaml.DEFAULT_SCHEMA.extend(unsafe);

const src = `
- !!js/regexp /pattern/gim
- !!js/undefined ''
- !!js/function 'function () { return true }'
`

yaml.load(src, { schema });

Readme

Keywords

Package Sidebar

Install

npm i js-yaml-js-types-esm

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

7.42 kB

Total Files

7

Last publish

Collaborators

  • felixwoestmann