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

babel-plugin-functional-composition

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

babel-plugin-functional-composition - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# v1.0.1 (2016-09-09)
---
## Bug Fixes
- fix(babel-plugin-functional-composition): only add imports when a directive is present in a file [36261afa](https://github.com/TylorS/babel-plugin-functional-composition/commits/36261afae7ee057d8df64867db147801c2290305)
# v1.0.0 (2016-09-09)

@@ -2,0 +11,0 @@ ---

15

index.js

@@ -19,2 +19,4 @@ const DIRECTIVE = 'use fc'

let _hasDirective = false
const visitor = {

@@ -24,4 +26,6 @@ Program: {

exit (path, { opts }) {
const { name = 'pipe', as = 'pipe', from } = opts
if (!_hasDirective) return
const { name = 'pipe', as = 'pipe', from } = opts || {}
if (!from) return

@@ -38,4 +42,6 @@

exit (path, { opts }) {
const { as = 'pipe' } = opts
if (!hasDirective(path)) return
const { as = 'pipe' } = opts || {}
if (isPipeCall(as, path.node)) {

@@ -56,4 +62,7 @@ const [left, right] = path.node.arguments

if (!hasDirective(path)) return
const { as = 'pipe' } = opts
_hasDirective = true
const { as = 'pipe' } = opts || {}
if (isPipe(path)) {

@@ -60,0 +69,0 @@ const [left, right] = side(path)

2

package.json
{
"name": "babel-plugin-functional-composition",
"version": "1.0.0",
"version": "1.0.1",
"description": "Functional Composition for JavaScript",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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