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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcas-api

v0.0.7

Published

API to communicate with MCAS

Downloads

10

Readme

MCAS-API

NPM Version

  1. mcasAPI contains functions :
  - mcasAPI.init()
  - mcasAPI.isInit()
  - mcasAPI.auth()
  - mcasAPI.register()
  - mcasAPI.overwrite()
  - mcasAPI.delete()
  - mcasAPI.rootAuth()
  - mcasAPI.rootAuthUser()
  - mcasAPI.rootList()
  - mcasAPI.rootRegister()
  - mcasAPI.rootOverwrite()
  - mcasAPI.rootDelete()
  - mcasAPI.rootFlush()
  1. To install mcas-api :
sudo npm install mcas-api
  1. In you js file you can require mcas-api using :
var mcasAPI = require('mcas-api');
  1. User API
   /* init mcasAPI with your MCAS info (IP and PORT) */
   mcasAPI.init({ MCASip : "domainNameOfMCAS", MCASport : "portOfMCAS" })
   
   /* Authenticate User */
   mcasAPI.auth({ username : "myosXcorp", password : "mxcpasswd" },
   function onSuccess(UserData) {
    console.log(UserData)
    /* ... */
   },
   function onError() {
    /* ... */
   });
   
   /* Normal Register, doesn't require root-access, set type of created user to 4 (User) */
   /* it require an email verification to activate account */
   /* (only gmail.com, yahoo.com/fr, hotmail.com/fr are allowed ) */
   mcasAPI.register({ username : "myosXcorp2",
                      password : "myOscorpIndustries",
                      firstName : "Norman",
                      lastName : "Osborne",
                      email : "[email protected]" },
                      function onResponse(response) {
                        console.log(response)
                      })
                      
   /* Allows an User to OverWrite his data, it require a new email confirmation to reActivate account */
    mcasAPI.overwrite({ username : "myosXcorp2",
                      password : "myOscorpIndustries",
                      newpassword : "myOSXcorp",
                      firstName : "Norman",
                      lastName : "Osborne",
                      email : "[email protected]" },
                      function onResponse(response) {
                        console.log(response)
                      })
                      
   /* Allow an User to Delete his account */
   mcasAPI.delete({ username : "myosXcorp3",
                    password : "wolf4D" },
                    function onResponse(response) {
                       console.log(response)
                    })
                  
  1. Root API On MCAS, any user who has type set to 0 is root
/* Authenticate root user */
mcasAPI.rootAuth({ username : "rootIsME", password : "mevkspavfsgdkqgtoal" },
                  function onSuccess(RootUserData) {
                     console.log(RootUserData);
                     /* ... */
                  },
                  function onError() {
                     /* ... */
                  })

/* Allows root to register new user, set his type, while bypassing email verification. */
mcasAPI.rootRegister({
                      username : "rootIsMe",
                      password : "mevkspavfsgdkqgtoal",
                      userusername : "modbIsComing",
                      userpassword : "TequilaSunriseDataBase",
                      firstName : "MYOS",
                      lastName : "CORP",
                      email : "[email protected]",
                      type : 3
                     },
                     function onResponse(registerResponse) {
                       console.log(registerResponse)
                     })

/* Allows Root to overwrite userdata of any user */
mcasAPI.rootOverwrite({ username : "rootIsMe",
                        password : "mevkspavfsgdkqgtoal",
                        userusername : "modbIsComing",
                        userpassword : "TequilaSunriseDataBase2",
                        firstName : "MYOS",
                        lastName : "CORP",
                        email : "[email protected]",
                        type : 8
                      },
                      function onResponse(overwriteResponse) {
                         console.log(overwriteResponse)
                      })
  
/* Delete any user */   
mcasAPI.rootDelete({ username : "rootIsMe", 
                     password : "mevkspavfsgdkqgtoal",
                     userusername : "myosxcorp"
                   },
                   function onResponse(deleteResponse) {
                      /* ... */
                   })

/* Get UserData of an User */
mcasAPI.rootAuthUser({ username : "rootIsMe",
                       password : "mevkspavfsgdkqgtoal",
                       search : "myosxcorp2"
                     },
                     function onSuccess(UserData) {
                        /* ... */
                     },
                     function onError() {
                        /* ... */
                     })

/* Get the UsersArray, defined inside the file mcas/Userlist.json on your MCAS */
mcasAPI.rootList({ username : "rootIsMe",
                   password : "mevkspavfsgdkqgtoal"
                 },
                 function onResponse(UsersArray)
                 {
                    /* ... */
                 })


/* Delete account not activated */
mcasAPI.rootFlush({ username : "rootIsMe",
                    password : "mevkspavfsgdkqgtoal"
                  },
                  function onResponse(rootFlushResponse)
                  {
                      /* ... */
                  })