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

mz

Package Overview
Dependencies
Maintainers
7
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 2.2.0 to 2.3.0

2

fs.js
var Promise = require('native-or-bluebird')
var Promise = require('any-promise')
var fs

@@ -4,0 +4,0 @@ try {

2.3.0 / 2016-01-30
==================
* feat(package): switch to `any-promise` to support more promise engines
2.2.0 / 2016-01-24

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

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

@@ -14,10 +14,10 @@ "name": "Jonathan Ong",

"dependencies": {
"native-or-bluebird": "1",
"any-promise": "0.2.0",
"object-assign": "^4.0.1",
"thenify-all": "1"
"thenify-all": "^1.0.0"
},
"devDependencies": {
"istanbul": "0",
"bluebird": "2",
"mocha": "2"
"istanbul": "^0.4.0",
"bluebird": "^3.0.0",
"mocha": "^2.0.0"
},

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

var readline = require('readline')
var Promise = require('native-or-bluebird')
var Promise = require('any-promise')
var objectAssign = require('object-assign')

@@ -4,0 +4,0 @@ var Interface = readline.Interface

@@ -33,11 +33,11 @@

Personally, I use this with generator-based control flow libraries such as [co](https://github.com/visionmedia/co) so I don't need to use implementation-specific wrappers like [co-fs](https://github.com/visionmedia/co-fs).
With ES2017, this will allow you to use async functions cleanly with node's core API:
```js
var co = require('co')
var fs = require('mz/fs')
const fs = require('mz/fs')
co(function* () {
if (yield fs.exists(__filename)) // do something
})()
async function doSomething () {
if (await fs.exists(__filename)) // do something
}
```

@@ -68,12 +68,4 @@

If you've installed [bluebird][bluebird],
[bluebird][bluebird] will be used.
`mz` does not install [bluebird][bluebird] for you.
`mz` uses [`any-promise`](https://github.com/kevinbeaty/any-promise).
Otherwise, if you're using a node that has native v8 Promises (v0.11.13+),
then that will be used.
Otherwise, this library will crash the process and exit,
so you might as well install [bluebird][bluebird] as a dependency!
## FAQ

@@ -84,3 +76,4 @@

Yes, Node 4.x ships with stable promises support. For older engines,
you should probably install [bluebird][bluebird].
you should probably install your own promise implementation and register it with
`require('any-promise/register')('bluebird')`.

@@ -98,2 +91,3 @@ ### Will this make my app faster?

- New APIs in node.js that are not available in older versions of node
- ECMAScript7 Streams

@@ -100,0 +94,0 @@

Sorry, the diff of this file is not supported yet

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