npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

x3dvalidate

v8.8.1

Published

X3D JSON validation tool, uses Ajv and X3D JSON schema, use from command line with npx x3dvalidate JSON_file1 JSON_file2 ...

Downloads

85

Readme

x3dvalidate

Validate JSON files (.x3dj or .json) against X3D JSON schema version 4.0 with Ajv

Node.js is a requirement: Download from https://nodejs.org/

First install node.js and git. Download and install node.js from https://nodejs.org/. Download and install git is available at https://git-scm.com/

git clone https://github.com/coderextreme/x3dvalidate
cd x3dvalidate
npm install -g x3dvalidate
node x3dvalidate.js examples/*.json    # use your own .x3dj or .json files (any extension works)
node test/app.js # simple test app

x3dvalidate is a full npx program (an npm module), thus you can run:

npx x3dvalidate file1.json file2.json ...
# NOTE:  I've had good luck specifying the full path to the JSON file(s)

For folders, I recommend using find and xargs on Linux/MacOS/Git for Windows/Git Bash/WSL

Example:

find ./examples -type f -name "*.json" -print0 | xargs -0 npx x3dvalidate

On Windows 10 (11?),

On windows PowerShell, you will need to set your Execution-Policy. Research PowerShell execution policies for the best policies. The first command below lists your policies and scope. . You will get a message with the website to go to if the powershell scripts fail. I recommend setting the policies back to the previous level when complete. Get old policy and scope from output of first command

PS C:\Users\yottzumm\x3dvalidate> Get-ExecutionPolicy -List
PS C:\Users\yottzumm\x3dvalidate> Set-ExecutionPolicy <policy> -Scope CurrentUser
PS C:\Users\yottzumm\x3dvalidate> .\bin\x3dvalidate.ps1 examples\abox.json .\examples\ball.json
PS C:\Users\yottzumm\x3dvalidate> Set-ExecutionPolicy <old policy> -Scope CurrentUser
PS C:\Users\yottzumm\x3dvalidate> Get-ExecutionPolicy -List

On the whole, it might be easier to run the Command Prompt.

C:\Users\yottzumm\x3dvalidate>bin\x3dvalidate.cmd examples\abox.json examples\ball.json

===================================================================================================================== For MacOS, install node.js, homebrew and git. Before running the commands above in Terminal, download an install homebrew from https://brew.sh/, and then invoke:

$ brew install git

in Terminal. Or git should be available in developer command tools from Apple. I was able to run node.js after installign the MacOS package from https://nodejs.org. Homebrew requires your password to install.