Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/is-mode-symlink
Check if a file mode integer represents symbolic link
https://github.com/shinnn/is-mode-symlink
Last synced: 27 days ago
JSON representation
Check if a file mode integer represents symbolic link
- Host: GitHub
- URL: https://github.com/shinnn/is-mode-symlink
- Owner: shinnn
- License: unlicense
- Created: 2015-02-12T14:15:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-21T14:44:12.000Z (almost 9 years ago)
- Last Synced: 2024-10-02T08:10:05.216Z (about 1 month ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-mode-symlink
[![NPM version](https://img.shields.io/npm/v/is-mode-symlink.svg)](https://www.npmjs.com/package/is-mode-symlink)
[![Bower version](https://img.shields.io/bower/v/is-mode-symlink.svg)](https://github.com/shinnn/is-mode-symlink/releases)
[![Build Status](https://travis-ci.org/shinnn/is-mode-symlink.svg?branch=master)](https://travis-ci.org/shinnn/is-mode-symlink)
[![Build status](https://ci.appveyor.com/api/projects/status/t4ac6ds7y4d3ak6o?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/is-mode-symlink)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/is-mode-symlink.svg)](https://coveralls.io/r/shinnn/is-mode-symlink)
[![devDependency Status](https://david-dm.org/shinnn/is-mode-symlink/dev-status.svg)](https://david-dm.org/shinnn/is-mode-symlink#info=devDependencies)Check if a [file mode](https://en.wikipedia.org/wiki/File_system_permissions) integer represents [symbolic link](https://en.wikipedia.org/wiki/Symbolic_link)
```javascript
isModeSymlink(41453) //=> true;
isModeSymlink(33261) //=> false;
```Like [Node](https://nodejs.org/)'s [`stats.isSymbolicLink()`](https://nodejs.org/api/fs.html#fs_class_fs_stats), but so portable as to work everywhere.
## Installation
### Package managers
#### [npm](https://www.npmjs.com/)
```
npm install is-mode-symlink
```#### [bower](http://bower.io/)
```
bower install is-mode-symlink
```#### [Duo](http://duojs.org/)
```javascript
const isModeSymlink = require('shinnn/is-mode-symlink');
```### Standalone
[Download the script file directly.](https://raw.githubusercontent.com/shinnn/is-mode-symlink/master/browser.js)
## API
### isModeSymlink(*mode*)
*mode*: `Number`
Return: `Boolean`It returns `true` if the number represents file mode of symbolic link, otherwise `false`.
## License
[The Unlicense](./LICENSE)