Socket
Socket
Sign inDemoInstall

make-generator-function

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

make-generator-function

Returns an arbitrary generator function, or undefined if generator syntax is unsupported.


Version published
Weekly downloads
952
increased by38.17%
Maintainers
1
Weekly downloads
 
Created
Source

#make-generator-function Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

Returns an arbitrary generator function, or undefined if generator syntax is unsupported. If both generator syntax and concise method syntax are supported, the generator function returned will have a "concise" property containing a concise generator method.

Example

var maybeGeneratorFunction = require('make-generator-function');
if (maybeGeneratorFunction) {
	assert(typeof maybeGeneratorFunction === 'function');
	var maybeConciseGeneratorMethod = maybeGeneratorFunction.concise;
	if (maybeConciseGeneratorMethod) {
		assert(typeof maybeConciseGeneratorMethod === 'function');
	}
} else {
	assert(typeof maybeGeneratorFunction === 'undefined');
}

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

Package last updated on 28 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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