posix-constants

posix constants for use in javascript

Usage no npm install needed!

<script type="module">
  import posixConstants from 'https://cdn.skypack.dev/posix-constants';
</script>

README

SYNOPSIS

Some posix constants I've found useful to have in javascript. Currently constants from <sys/errno.h> and a few from <sys/stat.h> (file modes) are present.

USAGE

var posixConst = require('posix-constants');
var errno = posixConst.errno;
var EPERM = errno.EPERM;

function no_perm() {
  return -EPERM;
}

process.exit(no_perm());