@stamp/privatize
Advanced tools
Comparing version 1.0.2 to 1.0.3
var compose = require('@stamp/compose'); | ||
var InstanceOf = require('@stamp/instanceof'); | ||
var Privatize = require('..'); | ||
@@ -79,3 +80,8 @@ | ||
expect(accessBar).toBe(Orig.compose.methods.bar); | ||
}) | ||
}); | ||
it('works with InstanceOf stamp', function () { | ||
const Stamp = compose(InstanceOf, Privatize); | ||
expect(Stamp() instanceof Stamp).toBe(true); | ||
}); | ||
}); |
@@ -38,2 +38,11 @@ var compose = require('@stamp/compose'); | ||
} | ||
// Integration with @stamp/instanceof | ||
if (typeof Symbol !== "undefined") { | ||
var stampSymbol = Symbol.for('stamp'); | ||
if (methods[stampSymbol]) { | ||
newObject[stampSymbol] = opts.stamp; | ||
} | ||
} | ||
return newObject; | ||
@@ -40,0 +49,0 @@ } |
{ | ||
"name": "@stamp/privatize", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Protect private properties", | ||
@@ -14,3 +14,6 @@ "main": "index.js", | ||
"@stamp/compose": "^1.0.2" | ||
}, | ||
"devDependencies": { | ||
"@stamp/instanceof": "^1.0.1" | ||
} | ||
} |
@@ -100,1 +100,5 @@ # @stamp/privatize | ||
``` | ||
## Development | ||
This `@stamp/privatize` module knows about and relies on other ecosystem stamps implementation. This means that other `@stamp/*` ecosystem stamps should know nothing about `@stamp/privatize`. But opposite is acceptable. |
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
8479
145
104
1