Comparing version 0.2.2 to 0.2.3
@@ -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 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
351761
4
31
10421
+ Addedprivate@>= 0.0.3
+ Addedprivate@0.1.8(transitive)