Have ideas to improve npm?Join in the discussion! »

    @stardust-configs/json-schema-validator
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.0 • Public • Published

    @stardust-configs/json-schema-validator

    JSON Schema validator

    • Support for using CLI and module
    • Support for multiple sources
    • Support for Glob Pattern sources
    • Support for local and remote JSON Schema

    Install

    $ npm install @stardust-configs/json-schema-validator --save-dev

    Usage

    import jsv from '@stardust-configs/json-schema-validator'
    
    // Truthy
    await jsv({
      src: 'tsconfig.json',
      schema: 'https://json.schemastore.org/tsconfig',
    })
    
    // Falsy
    await jsv({
      src: 'tsconfig.json',
      schema: 'https://json.schemastore.org/typoconfig',
    })

    In CLI.

    # basic
    $ jsv "tsconfig.json" --schema "https://json.schemastore.org/tsconfig"
    
    # glob
    $ jsv "tsconfig.*.json" --schema "https://json.schemastore.org/tsconfig"
    
    # multiple
    $ jsv "tsconfig.node.json" "tsconfig.jest.json" --schema "https://json.schemastore.org/tsconfig"
    
    # strict
    $ jsv "tsconfig.json" --schema "https://json.schemastore.org/tsconfig" --strict

    Author

    @p-chan

    License

    MIT

    Install

    npm i @stardust-configs/json-schema-validator

    DownloadsWeekly Downloads

    3

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    12 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar