Skip to content

Commit

Permalink
Implement support for multi-document sources
Browse files Browse the repository at this point in the history
  • Loading branch information
rasshofer committed Apr 22, 2022
1 parent 9ee0d44 commit e9e6b48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/__tests__/test3.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
name: Jane Doe
age: 39
---
gender: female
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFile } from 'fs';
import {
load,
loadAll,
FAILSAFE_SCHEMA,
JSON_SCHEMA,
CORE_SCHEMA,
Expand All @@ -23,7 +23,7 @@ export type Options = {
export const lint = (content: string, opts?: Options): Promise<boolean> =>
new Promise((resolve, reject) => {
try {
load(content, {
loadAll(content, undefined, {
schema: schemas[opts?.schema ?? 'DEFAULT_SCHEMA'],
});
resolve(true);
Expand Down

0 comments on commit e9e6b48

Please sign in to comment.