Socket
Socket
Sign inDemoInstall

mz

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mz - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

2

child_process.js
require('thenify-all')(
require('thenify-all').withCallback(
require('child_process'),

@@ -4,0 +4,0 @@ exports, [

require('thenify-all')(
require('thenify-all').withCallback(
require('crypto'),

@@ -4,0 +4,0 @@ exports, [

require('thenify-all')(
require('thenify-all').withCallback(
require('dns'),

@@ -4,0 +4,0 @@ exports, [

var fs;
var Promise = require('native-or-bluebird')
var fs
try {
fs = require('graceful-fs');
fs = require('graceful-fs')
} catch(err) {
fs = require('fs');
fs = require('fs')
}

@@ -40,14 +41,19 @@

var access = fs.access
typeof access === 'function' && api.push('access')
typeof fs.access === 'function' && api.push('access')
require('thenify-all')(fs, exports, api)
require('thenify-all').withCallback(fs, exports, api)
var promisify = require('thenify')
// don't know enough about promises to do this haha
exports.exists = promisify(function exists(filename, done) {
fs.stat(filename, function (err) {
done(null, !err)
exports.exists = function (filename, callback) {
// callback
if (typeof callback === 'function') {
return fs.stat(filename, function (err) {
callback(null, !err);
})
}
// or promise
return new Promise(function (resolve) {
fs.stat(filename, function (err) {
resolve(!err)
})
})
})
}
2.0.0 / 2015-05-24
==================
* support callbacks as well
1.2.0 / 2014-12-16

@@ -3,0 +8,0 @@ ==================

{
"name": "mz",
"description": "modernize node.js to current ECMAScript standards",
"version": "1.3.0",
"version": "2.0.0",
"author": {

@@ -15,3 +15,2 @@ "name": "Jonathan Ong",

"native-or-bluebird": "1",
"thenify": "3",
"thenify-all": "1"

@@ -18,0 +17,0 @@ },

@@ -10,3 +10,2 @@

[![Downloads][downloads-image]][downloads-url]
[![Gittip][gittip-image]][gittip-url]

@@ -114,3 +113,1 @@ Modernize node.js to current ECMAScript specifications!

[downloads-url]: https://npmjs.org/package/mz
[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
[gittip-url]: https://www.gittip.com/jonathanong/
require('thenify-all')(
require('thenify-all').withCallback(
require('zlib'),

@@ -4,0 +4,0 @@ exports, [

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