Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yo-fs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yo-fs - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

1

index.js

@@ -67,2 +67,3 @@ var relative = require('relative-date')

console.log('done')
yo.update(widget, elem)
})

@@ -69,0 +70,0 @@ }

4

package.json
{
"name": "yo-fs",
"version": "1.0.2",
"description": "a filesystem browser built with yo",
"version": "1.0.3",
"description": "A client-side modular stream-friendly ui browser widget for navigating directories.",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

# yo-fs
A client-side modular, stream-friendly ui browser widget for navigating directories, built with [yo-yo](npmjs.org/yo-yo).
[![NPM](https://nodei.co/npm/yo-fs.png)](https://nodei.co/npm/yo-fs/)
## api
#### `yofs(widget, root, entries, onclick)`
* `widget`: if we already have a widget, update it, otherwise make a new one.
* `path`: the directory or filename to display
* `entries`: a list of entries with `name`, `size`, `modified`, `createReadStream`
* `onclick`: fires when a folder, file, or back button is clicked.
## example
```js
var yofs = require('yo-fs')
var onclick = function (event, entry) {
console.log('i clicked', entry)
}
var el = yofs(null, '/', entries, onclick)
document.body.appendChild(el)
var stream = //stream that gives me some data...
stream.on('data', function (entry) {
entries.push(entry)
yofs(widget, '/', entries, onclick) // dynamically updates the widget
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc