is-mdm
v0.0.3
Published
is-mdm allows for quick, zero dependency checking of whether or not the device it is run on is a managed device.
Readme
is-mdm
is-mdm is a tiny library inspired by LGUG2Z's article on detecting MDM. While the article uses rust, I wanted to do the same thing in JavaScript quickly and as a zero dependency module.
Usage
const isMdm = require('is-mdm')
isMdm() // will return true if we think the device is managed by MDM, otherwise will return falseSupported Platforms
Currently, is-mdm supports both macOS and Windows. We use Node.js's process.platform to determine which platform-specific command to run to collect MDM output.
If you'd like to add support for AIX, Darwin, FreeBSD, Linux, OpenBSD, or SunOS, PRs are welcome.
API
isMdm()
Returns a boolean indicating whether or not the current device is managed by MDM.
Under the hood, isMdm() runs isMdmMacOS() or isMdmWindows(), depending on the platform detected with process.platform.
