Registry / data / babel-helper-simple-access

babel-helper-simple-access

JSON →
library7.0.0-beta.3jsnpmunverified

A Babel helper package (currently at v7.0.0-beta.3) that transforms complex assignment patterns (e.g., `i += 1`, `--i`) into simple assignments for easier AST manipulation. It is part of the Babel ecosystem, primarily used internally by Babel plugins. Unlike general-purpose AST utilities, it specifically handles converting compound assignments and unary mutations to straightforward `i = i + 1` style assignments. This package is in beta and likely deprecated in favor of modern Babel 8 helpers.

npm install babel-helper-simple-access
INSTALL
IMPORT
SIG · BABEL-HELPER-SIMPL
B
babel-helper-simple-access
datajavascriptv7.0.0-beta.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import simpleAccess from 'babel-helper-simple-access'
const simpleAccess = require('babel-helper-simple-access').default
Default export; CJS require does not need .default if using default export. Use ESM for clarity.
simpleAccess
import simpleAccess from 'babel-helper-simple-access'
import { simpleAccess } from 'babel-helper-simple-access'
The module exports a single function as default export, not named. Removing braces is required.
types (from @babel/types)
import * as t from '@babel/types'
import t from '@babel/types'
The helper works with Babel types. Typically used alongside @babel/types for AST node creation.

Demonstrates using simpleAccess to convert a compound assignment into a simple assignment.

import simpleAccess from 'babel-helper-simple-access'; import * as t from '@babel/types'; // Example: convert `i += 1` to `i = i + 1` const ast = t.expressionStatement( t.assignmentExpression('+=', t.identifier('i'), t.numericLiteral(1)) ); simpleAccess(ast, [t.identifier('i')]); console.log(ast); // Now `ast` contains simple assignment // Note: This is a low-level helper; not intended for standalone use.
Debug
Known issues
deprecatedThis package is part of Babel 7 beta and is deprecated. Use Babel 8's internal helpers instead.
fix
Migrate to @babel/helper-simple-access if available, or use Babel 8 plugins.
affects: >=7.0.0-beta.3
gotchaThis helper does not handle destructuring patterns like `{ a } = foo`.
fix
Manually handle destructuring or use a different transformation pass.
affects: >=7.0.0-beta.3
breakingAPI may change in future versions; this package is experimental.
fix
Pin to a specific version and test thoroughly.
affects: >=7.0.0-beta.3
Errors
Common errors & fixes
TypeError: simpleAccess is not a function
Incorrect import: using named import instead of default import.
fix
Use `import simpleAccess from 'babel-helper-simple-access'` (default import).
Error: Cannot find module 'babel-helper-simple-access'
Package not installed or version mismatch.
fix
Run `npm install babel-helper-simple-access@7.0.0-beta.3` and ensure it's in package.json.
ReferenceError: t is not defined
Missing @babel/types dependency.
fix
Install @babel/types: `npm install @babel/types` and import it.
Upgrade
Version history
7.0.0-beta.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
1
Resources
babel-helper-simple-access — npm install babel-helper-simple-access · libregistry