universal-mock
Advanced tools
Comparing version 1.0.2 to 1.1.0
"use strict"; | ||
const createProxy = function () { | ||
// our proxy object; we're overriding its get, set, and has traps to | ||
// intercept those operations | ||
const target = function () { return createProxy(); }; | ||
target[Symbol.toPrimitive] = () => "UniversalMock"; | ||
return new Proxy(target, { | ||
// tslint:disable-next-line:no-reserved-keywords | ||
set(trapTarget, key, value, receiver) { | ||
@@ -12,3 +10,2 @@ target[key] = value; | ||
}, | ||
// tslint:disable-next-line:no-reserved-keywords | ||
get(trapTarget, key, receiver) { | ||
@@ -15,0 +12,0 @@ return target[key] || (key === "__ko_proto__" ? undefined : target[key] = createProxy()); |
@@ -13,6 +13,6 @@ module.exports = function (grunt) { | ||
grunt.loadNpmTasks("grunt-ts"); | ||
grunt.registerTask("jasmine", function() { | ||
const done = this.async(); | ||
child_process.exec("node ./node_modules/jasmine/bin/jasmine.js", { | ||
child_process.spawn("node", ["./node_modules/jasmine/bin/jasmine.js"], { | ||
stdio: "inherit" | ||
@@ -31,2 +31,2 @@ }).on("close", (code) => { | ||
grunt.registerTask("verify", ["ts", "jasmine"]); | ||
}; | ||
}; |
{ | ||
"name": "universal-mock", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "A JavaScript object that is everything", | ||
@@ -5,0 +5,0 @@ "main": "dist/universalMock.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
13126
17
251