Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/skpm/fs
- Owner: skpm
- License: mit
- Created: 2016-12-08T18:09:11.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T04:03:52.000Z (about 2 years ago)
- Last Synced: 2024-11-16T01:38:26.556Z (about 2 months ago)
- Topics: nodejs, polyfill, sketch
- Language: JavaScript
- Homepage:
- Size: 1.47 MB
- Stars: 27
- Watchers: 2
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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')
```