$10 GRAYBYTE WORDPRESS FILE MANAGER $46

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/umask/

HOME
Current File : /opt/alt/alt-nodejs14/root/usr/lib/node_modules/npm/node_modules.bundled/umask//README.md
# umask

Convert umask from string <-> number.

## Installation & Use

```
$ npm install -S umask

var umask = require('umask');

console.log(umask.toString(18));        // 0022

console.log(umask.fromString('0777'))   // 511
```

## API

### `toString( val )`

Converts `val` to a 0-padded octal string.  `val` is assumed to be a
Number in the correct range (0..511)

### `fromString( val, [cb] )`

Converts `val` to a Number that can be used as a umask.  `val` can
be of the following forms:

  * String containing octal number (leading 0)
  * String containing decimal number
  * Number

In all cases above, the value obtained is then converted to an integer and
checked against the legal `umask` range 0..511

`fromString` can be used as a simple converter, with no error feedback, by
omitting the optional callback argument `cb`:

```
   var mask = umask.fromString(val);

   // mask is now the umask descibed by val or
   // the default, 0022 (18 dec)
```

The callback arguments are `(err, val)` where `err` is either `null` or an
Error object and `val` is either the converted umask or the default umask, `0022`.

```
   umask.fromString(val, function (err, val) {
       if (err) {
          console.error("invalid umask: " + err.message)
       }

       /* do something with val */
   });
```

The callback, if provided, is always called **synchronously**.

### `validate( data, k, val )`

This is a validation function of the form expected by `nopt`.  If
`val` is a valid umask, the function returns true and sets `data[k]`.
If `val` is not a valid umask, the function returns false.

The `validate` function is stricter than `fromString`: it only accepts
Number or octal String values, and the String value must begin with `0`.
The `validate` function does **not** accept Strings containing decimal
numbers.

# Maintainer

Sam Mikes <smikes@cubane.com>

# License

MIT

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.02 AM
root / root
0755
.npmignore
0.573 KB
23 Mar 2023 10.28 PM
root / root
0644
ChangeLog
0.203 KB
23 Mar 2023 10.28 PM
root / root
0644
LICENSE
1.052 KB
23 Mar 2023 10.28 PM
root / root
0644
README.md
1.84 KB
23 Mar 2023 10.28 PM
root / root
0644
index.js
1.961 KB
23 Mar 2023 10.28 PM
root / root
0644
package.json
1.284 KB
23 Mar 2023 10.28 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF