🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

acclimate-variables

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
a

acclimate-variables

rename all invalid identifiers in an AST

0.1.2
latest
69

Supply Chain Security

100

Vulnerability

73

Quality

76

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Wildcard dependency

Quality

Package has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.

Found 2 instances in 1 package

Dependencies have 1 high alert.

GitHub dependency

Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Issues
0

acclimate-variables

rename all invalid identifiers in an AST

Motivation

When compiling to JS its a pain to worry if the identifiers you generate are safe to use in JS code. And if not what is. With this module you just don't worry it at all then, just before you generate your JS, run your AST through the acclimate function.

Installation

With your favorite package manager:

  • packin: packin add jkroso/acclimate-variables
  • component: component install jkroso/acclimate-variables
  • npm: npm install acclimate-variables

then in your app:

var acclimate = require('acclimate-variables')

API

acclimate(node)

translate all identifiers in node to ones safe to use in JS code.

acclimate({type:'Identifier', name: 'number->string'}) // => {type:'Identifier', name: 'numberToString'}
acclimate({type:'Identifier', name: 'string?'}) // => {type:'Identifier', name: 'isString'}

FAQs

Package last updated on 28 Oct 2014

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