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

m-io

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-io - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

5

CHANGELOG.md
# Release notes for `m-io`
<a name="current-release"></a>
# Version 0.4.0 (Mon, 13 Feb 2017 22:59:01 GMT)
* [932d674](https://github.com/nknapp/m-io/commit/932d674) Add function `.isDirectory()` - Nils Knappmeier
* [4b12e8f](https://github.com/nknapp/m-io/commit/4b12e8f) Remove Node 0.10 and 5 from TravisCI and add 7 - Nils Knappmeier
# Version 0.3.1 (Tue, 20 Dec 2016 00:01:59 GMT)

@@ -5,0 +10,0 @@

15

fs.js

@@ -61,3 +61,3 @@ /*!

makeTree: function makeTree (aPath, mode) {
return Q.nfcall(require('mkdirp'), aPath, {mode: mode})
return Q.nfcall(require('mkdirp'), aPath, { mode: mode })
},

@@ -97,4 +97,15 @@

return Q.ninvoke(fs, 'stat', aPath)
},
isDirectory: function isDirectory (directory) {
return this.stat(directory)
.then(
function (stat) {
return stat.isDirectory()
},
function () {
return false
}
)
}
}

@@ -101,0 +112,0 @@

2

package.json
{
"name": "m-io",
"version": "0.3.1",
"version": "0.4.0",
"description": "(Incomplete) replacement for q-io",

@@ -5,0 +5,0 @@ "repository": {

@@ -58,2 +58,12 @@ # m-io

// Checking for directories
.then(() => FS.isDirectory('city/germany'))
.then((isDirectory) => console.log('Is `city/germany` a directory?', isDirectory))
.then(() => FS.isDirectory('city/germany/darmstadt.md'))
.then((isDirectory) => console.log('Is `city/germany/darmstadt.md` a directory?', isDirectory))
.then(() => FS.isDirectory('city/germany/non-existing-file'))
.then((isDirectory) => console.log('Is `city/germany/non-existing-file` a directory?', isDirectory))
// Directory listings

@@ -85,2 +95,5 @@ .then(() => FS.list('city'))

Directory something-else exists? false
Is `city/germany` a directory? true
Is `city/germany/darmstadt.md` a directory? false
Is `city/germany/non-existing-file` a directory? false
Directory entries of city [ 'france', 'germany', 'usa' ]

@@ -87,0 +100,0 @@ List files: [ 'city/france/paris.md',

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