# macos-alias

> Mac OS aliases creation and reading from node.js

Latest version **0.2.12** (published 2024-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install macos-alias
pnpm add macos-alias
yarn add macos-alias
bun add macos-alias
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.12 |
| Published | 2024-11-20 |
| First published | 2014-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 16 |
| Author | Linus Unnebäck |
| Maintainers | linusu |

## Links

- npm: https://www.npmjs.com/package/macos-alias
- Repository: https://github.com/LinusU/node-alias
- Homepage: https://github.com/LinusU/node-alias#readme
- Issues: https://github.com/LinusU/node-alias/issues
- npm.io page: https://npm.io/package/macos-alias

## Dependencies (1)

- [nan](https://npm.io/package/nan.md) ^2.4.0

## Recent versions

- 0.2.12 (latest) — 2024-11-20
- 0.2.11 — 2016-10-02
- 0.2.10 — 2016-10-02
- 0.2.9 — 2015-10-03
- 0.2.8 — 2015-08-22
- 0.2.7 — 2015-08-01
- 0.2.6 — 2015-01-17
- 0.2.5 — 2014-12-10
- 0.2.4 — 2014-12-09
- 0.2.3 — 2014-12-06
- 0.2.2 — 2014-09-19
- 0.2.1 — 2014-04-26
- 0.2.0 — 2014-01-13
- 0.1.3 — 2014-01-13
- 0.1.2 — 2014-01-07
- … 2 more at https://npm.io/package/macos-alias/versions

## README

# node-alias

Mac OS aliases creation and reading from node.js

## Attention

This library does currently not handle the `book\0\0\0\0mark\0\0\0\0`-header. It only does manipulation on the raw alias data.

I intend to add something like `alias.write(buf, path)` and `alias.read(path)`.

## Installation

```sh
npm install macos-alias
```

## Usage

```javascript
var alias = require('macos-alias');
```

## API

### alias.create(target)

Create a new alias pointing to `target`, returns a buffer.

(This function performs blocking fs interaction)

### alias.decode(buf)

Decodes buffer `buf` and returns an object with info about the alias.

### alias.encode(info)

Encodes the `info`-object into an alias, returns a buffer.

### alias.isAlias(path)

Check if the file at `path` is an alias, returns a boolean.

(This function performs blocking fs interaction)

## Hacking

Clone the repo and start making changes, run `node-gyp` to build the project.

```sh
node-gyp rebuild
```

## Tests

```sh
mocha
```

---
_Source: https://npm.io/package/macos-alias · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
