Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/skpm/fs

Drop-in replacement for the fs NodeJS package
https://github.com/skpm/fs

nodejs polyfill sketch

Last synced: about 2 months ago
JSON representation

Drop-in replacement for the fs NodeJS package

Awesome Lists containing this project

README

        

# `fs` for Sketch

All the sync [nodejs fs](https://nodejs.org/api/fs.html) API is available.

:warning: The version 0.2.* requires Sketch 52 or above. Use the version 0.1.* if you need to support earlier version of Sketch.

`fs.writeFileSync`, `fs.appendFileSync` and `fs.readFileSync` accept an `NSData` as encoding

## Installation

```bash
npm install @skpm/fs
```

## Usage

```js
const fs = require('@skpm/fs')

fs.readFileSync('/path/to/file')
```