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 🙏

© 2025 – Pkg Stats / Ryan Hefner

occjs-wrapper

v2.0.0-beta.b5ff984-15

Published

The purpose of this library is to provide a wrapper around the OCCJS library that helps with handling method overloads.

Readme

OCCJS-Wrapper (Opencascade.js Wrapper)

The purpose of this library is to provide a wrapper around the OCCJS library that helps with handling method overloads.

So instead of writing this:

const point1 = new oc.gp_Pnt_3(0, 0, 0);
const point2 = new oc.gp_Pnt_2(new oc.gp_XYZ_1(0, 0, 0));

You can write this:

const point1 = new oc.gp_Pnt(0, 0, 0);
const point2 = new oc.gp_Pnt(new oc.gp_XYZ(0, 0, 0));

The library will automatically resolve the correct overload based on the parameter types you pass. When using with Typescript you get the overloads signatures information in the IDE.

Currently the library does not handle null parameters, so if any of the parameters is null, it will not be able to resolve the correct overload. This will be fixed in the future.

Please note I tested this only on a project I work on and it is working fine. I'll keep fixing bugs as I encounter them.

To use this library just replace the opencascade.js import with occjs-wrapper.js in your project:

import initOpenCascade from 'occjs-wrapper.js';
import { gp_Pnt } from 'occjs-wrapper.js';

Node:

import initOpenCascade from 'occjs-wrapper.js/dist/node.js';

Installation

You can install the library using npm:

npm install occjs-wrapper

It would be cool to make this part of the original library, but it'll require some time and effort to integrate it which currently I do not have. If anyone is interested in contributing to the original library, please feel free to do so.