How to use the umask.fromString function in umask

To help you get started, we’ve selected a few umask examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github muammar / mkchromecast / nodejs / node-7.5.0 / lib / node_modules / npm / lib / utils / umask.js View on Github external
var umask = require('umask')
var npmlog = require('npmlog')
var _fromString = umask.fromString

module.exports = umask

// fromString with logging callback
umask.fromString = function (val) {
  _fromString(val, function (err, result) {
    if (err) {
      npmlog.warn('invalid umask', err.message)
    }
    val = result
  })

  return val
}
github muammar / mkchromecast / nodejs / node-7.5.0 / lib / node_modules / npm / lib / utils / umask.js View on Github external
var umask = require('umask')
var npmlog = require('npmlog')
var _fromString = umask.fromString

module.exports = umask

// fromString with logging callback
umask.fromString = function (val) {
  _fromString(val, function (err, result) {
    if (err) {
      npmlog.warn('invalid umask', err.message)
    }
    val = result
  })

  return val
}

umask

convert umask from string <-> number

MIT
Latest version published 10 years ago

Package Health Score

62 / 100
Full package analysis

Popular umask functions