Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// https://repl.it/@ehmicky/unix-permissions
'use strict'
// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')
const { type } = require('unix-permissions')
console.log(type('1')) // 'octal'
console.log(type(1)) // 'number'
console.log(type('a+x')) // 'symbolic'
console.log(type('a+i')) // 'invalid'
// - then `node node_modules/unix-permissions/examples/methods/type.js`
// An online demo is also available at:
// https://repl.it/@ehmicky/unix-permissions
'use strict'
// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')
const { type } = require('unix-permissions')
console.log(type('1')) // 'octal'
console.log(type(1)) // 'number'
console.log(type('a+x')) // 'symbolic'
console.log(type('a+i')) // 'invalid'
// This file can be directly run:
// - first install `unix-permissions`
// - then `node node_modules/unix-permissions/examples/methods/type.js`
// An online demo is also available at:
// https://repl.it/@ehmicky/unix-permissions
'use strict'
// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')
const { type } = require('unix-permissions')
console.log(type('1')) // 'octal'
console.log(type(1)) // 'number'
console.log(type('a+x')) // 'symbolic'
console.log(type('a+i')) // 'invalid'
// Demo of the `type()` method in JavaScript.
// This file can be directly run:
// - first install `unix-permissions`
// - then `node node_modules/unix-permissions/examples/methods/type.js`
// An online demo is also available at:
// https://repl.it/@ehmicky/unix-permissions
'use strict'
// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')
const { type } = require('unix-permissions')
console.log(type('1')) // 'octal'
console.log(type(1)) // 'number'
console.log(type('a+x')) // 'symbolic'
console.log(type('a+i')) // 'invalid'