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

recast

Package Overview
Dependencies
Maintainers
2
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recast - npm Package Compare versions

Comparing version 0.21.5 to 0.22.0

3

lib/options.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalize = void 0;
var util_1 = require("./util");
var defaults = {

@@ -9,3 +10,3 @@ parser: require("../parsers/esprima"),

reuseWhitespace: true,
lineTerminator: require("os").EOL || "\n",
lineTerminator: util_1.getLineTerminator(),
wrapColumn: 74,

@@ -12,0 +13,0 @@ sourceFileName: null,

@@ -0,1 +1,3 @@

export declare function getLineTerminator(): any;
export declare function isBrowser(): boolean;
export declare function getOption(options: any, key: any, defaultValue: any): any;

@@ -2,0 +4,0 @@ export declare function getUnionOfKeys(...args: any[]): any;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = void 0;
exports.isTrailingCommaEnabled = exports.getParentExportDeclaration = exports.isExportDeclaration = exports.fixFaultyLocations = exports.getTrueLoc = exports.composeSourceMaps = exports.copyPos = exports.comparePos = exports.getUnionOfKeys = exports.getOption = exports.isBrowser = exports.getLineTerminator = void 0;
var tslib_1 = require("tslib");

@@ -12,2 +12,10 @@ var assert_1 = tslib_1.__importDefault(require("assert"));

var hasOwn = Object.prototype.hasOwnProperty;
function getLineTerminator() {
return isBrowser() ? "\n" : require("os").EOL || "\n";
}
exports.getLineTerminator = getLineTerminator;
function isBrowser() {
return (typeof window !== "undefined" && typeof window.document !== "undefined");
}
exports.isBrowser = isBrowser;
function getOption(options, key, defaultValue) {

@@ -14,0 +22,0 @@ if (options && hasOwn.call(options, key)) {

{
"author": "Ben Newman <bn@cs.stanford.edu>",
"name": "recast",
"version": "0.21.5",
"version": "0.22.0",
"description": "JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator",

@@ -45,2 +45,3 @@ "keywords": [

"dependencies": {
"assert": "^2.0.0",
"ast-types": "0.15.2",

@@ -65,3 +66,3 @@ "esprima": "~4.0.0",

"lint-staged": "^12.4.1",
"mocha": "9.0.2",
"mocha": "^9.2.2",
"prettier": "^2.6.2",

@@ -68,0 +69,0 @@ "reify": "0.20.12",

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