Skip to content

@google-cloud/language v0.4.0

Choose a tag to compare

@stephenplusplus stephenplusplus released this 17 Oct 23:02
· 43865 commits to main since this release

Updating

$ npm install @google-cloud/language@0.4.0

⚠️ Breaking Changes

Promises have arrived!

Issue: #551
PR: #1706

It's been a long time coming, but we're finally here. We've shipped promise support in the Google Cloud Natural Language module!

Do I have to use promises?

Nope, carry on.

How do I use promises?

Don't pass a callback:

var language = require('@google-cloud/language')();

language.detectEntities('We promise this will work!')
  .then(function(data) {
    var entities = data[0];
  })
  .catch(function(err) {});