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

inferjs

v0.0.6

Published

A package of InferJS tools, designed for runtime checking of Javascript types and narrowing through expectations.

Downloads

15

Readme

InferJS Library

Contributors Forks Stargazers Issues MIT License

Heading  InferJS: Overview

A package of InferJS tools, designed for runtime checking of JavaScript types and narrowing through expectations.

Heading  InferJS: npm Package Contents

Heading  InferJS: Installation

Here are the different options for installing the latest InferJS package with npm.

Install Locally

npm install inferjs --save

Install Globally

npm install -g inferjs

Optional: If you would like to download the package source code with git:

git clone https://github.com/Codevendor/inferjs.git
git clone https://github.com/Codevendor/inferjs-library.git
git clone https://github.com/Codevendor/inferjs-compiler.git
git clone https://github.com/Codevendor/inferjs-doc-builder.git

InferJS Example

Heading  InferJS-Library: Package Overview

InferJS-Library allows you to easily add runtime type checking by utilizing JSDoc multi-line comments in both client and server side JavaScript. The library is part of the package named InferJS.

InferJS is provided with an InferJS-Compiler. The compiler interprets your JSDoc comments from your source code and compiles them into an InferObject file, that you can import into any JavaScript file.

With this library, you can also enable extended type checking and narrow down your data types with @infer expectation rules.

To view the repo and doumentation for the InferJS-Library.

Heading  InferJS-Compiler: Package Overview

A compiler that processes JSDoc comments into an InferObject file, for utilizing with the InferJS-Library. The InferJS-Compiler is part of a bigger project called InferJS. The compiler can be used for other third party projects, that may need to interpret JSDoc comments into JSON type files.

To view the repo and doumentation for the InferJS-Compiler.

Heading  InferJS-Doc-Builder: Package Overview

A custom JSDoc builder that includes InferJS type definitions. (Coming Soon...)

Heading  InferJS: Roadmap

  • [ Summer 2023 ] - Develop a custom JSDoc builder that incorporates InferJS definitions.
  • [ April 2023 ] - Create a plan for text localization with the InferJS repo.
  • [ March 2023 ] - First Release Date - Possible
  • [ Feb 2023 ] - Make Distributon Plan and Library Versioning for browser with Webpack and Terser for JS minification.
  • [ Jan 25, 2023 ] - Under Development and Testing

Heading  InferJS: Change Log

This will be moved to versioning record per each repo...

  • [ Feb 26, 2023] - Combine all InferJS tools into one npm package.

  • [ Feb 12, 2023 ] - Built a logger class for managing console logging of CLI InferJS-Compiler. Built a starting help menu system.

  • [ Feb 11, 2023 ] - Working on assertion test scripts for both InferJS-Library and InferJS-Compiler. Opted for using Nodejs test runner.

  • [ Feb 10, 2023 ] - Adding output module type for InferJS-Compiler. Param -output-file-options-module accepts ( esmodule | commonjs | script ). Defaults to esmodule.

  • [ Feb 9, 2023 ] - Creating package.json files per project InferJS-Library and InferJS-Compiler. Also adding a global package.json for whole InferJS repo, depending on the needs of the developer. Adding clean, build and test scripts to packpage.json.

  • [ Feb 8, 2023 ] - Building v0.0.2 of InferJS-Library. Library was not returning exception properly. Modified check() method to throw by default and return if param(returnException) is set to true.

  • [ Feb 7, 2023 ] - Building live example on InferJS.com website.

  • [ Jan 31, 2023 ] - Built package.json with build commands for webpack configs, to automate the building and versioning of the library. Updated readme.md with processes.

  • [ Jan 30, 2023 ] - Restructing InferJSCompiler for version package releases. Dist folder will conatin two sub folders, latest and versions.

  • [ Jan 29, 2023 ] - Changing the main InferJS repo structure to isolate projects and versioning. Redefined error type InferRuleError to InferExpectError.

  • [ Jan 27, 2023 ] - Added in InferJS-Compiler actions parse-list, parse-file-list. Removed bugs found in InferJS-Compiler and setup testing per action in .vscode launch and task files.

  • [ Jan 26, 2023 ] - Added in extended type checking to infer types. Updated InferJS-Compiler with terminal command argument processing.

Heading  InferJS: Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Inside each package has information about contributing.

  License

Distributed under the MIT License. See LICENSE.txt for more information.

Heading  InferJS: Support Related

Heading  InferJS: Acknowledgments

  • Codevendor - Thanks to developer: Adam Smith for creating InferJS.
  • JSDoc - Thanks to Michael Mathews and Gabriel Reid for creating JSDoc.
  • Bunting Labs - Thanks to Brendan Ashworth, for transferring Ownership of npm Package name inferjs.