Socket
Socket
Sign inDemoInstall

recast

Package Overview
Dependencies
Maintainers
1
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.2.2 to 0.2.3

29

lib/lines.js

@@ -1,7 +0,8 @@

var assert = require("assert"),
normalizeOptions = require("./options").normalize;
var assert = require("assert");
var normalizeOptions = require("./options").normalize;
var getSecret = require("private").makeAccessor();
// Goals:
// 1. Minimize new string creation.
// 2. Keep (de)identation O(1) time.
// 2. Keep (de)identation O(lines) time.
// 3. Permit negative indentations.

@@ -17,12 +18,6 @@ // 4. Enforce immutability.

function setSecret() {
secret = {
lines: self,
infos: infos
};
}
getSecret(self).infos = infos;
Object.defineProperties(self, {
length: { value: infos.length },
setSecret: { value: setSecret }
length: { value: infos.length }
});

@@ -39,14 +34,2 @@ }

function getSecret(lines) {
secret = null;
try {
lines.setSecret();
assert.strictEqual(typeof secret, "object");
assert.strictEqual(secret.lines, lines);
return secret;
} finally {
secret = null;
}
}
function copyLineInfo(info) {

@@ -53,0 +36,0 @@ return {

@@ -15,3 +15,3 @@ {

],
"version": "0.2.2",
"version": "0.2.3",
"homepage": "http://github.com/benjamn/recast",

@@ -28,2 +28,3 @@ "repository": {

"esprima": "git://github.com/benjamn/esprima.git#master",
"private": ">= 0.0.3",
"ast-types": ">= 0.1.2"

@@ -30,0 +31,0 @@ },

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