@deepkit/core
Advanced tools
Comparing version 1.0.0-y.0 to 1.0.1-alpha.0
@@ -9,3 +9,2 @@ export * from './src/core'; | ||
export * from './src/network'; | ||
export * from './src/bench'; | ||
export * from './src/perf'; | ||
@@ -12,0 +11,0 @@ export * from './src/compiler'; |
@@ -21,3 +21,2 @@ "use strict"; | ||
__exportStar(require("./src/network"), exports); | ||
__exportStar(require("./src/bench"), exports); | ||
__exportStar(require("./src/perf"), exports); | ||
@@ -24,0 +23,0 @@ __exportStar(require("./src/compiler"), exports); |
@@ -6,2 +6,3 @@ export declare class CompilerContext { | ||
build(functionCode: string, ...args: string[]): Function; | ||
buildAsync(functionCode: string, ...args: string[]): Function; | ||
} |
@@ -36,4 +36,12 @@ "use strict"; | ||
} | ||
buildAsync(functionCode, ...args) { | ||
functionCode = ` | ||
return async function(${args.join(', ')}){ | ||
${functionCode} | ||
}; | ||
`; | ||
return new Function(...this.context.keys(), functionCode)(...this.context.values()); | ||
} | ||
} | ||
exports.CompilerContext = CompilerContext; | ||
//# sourceMappingURL=compiler.js.map |
@@ -166,3 +166,3 @@ "use strict"; | ||
function isArray(obj) { | ||
return (obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
return !!(obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
} | ||
@@ -169,0 +169,0 @@ exports.isArray = isArray; |
@@ -52,6 +52,6 @@ "use strict"; | ||
try { | ||
return await this[name][propertyKey]; | ||
return await this[name]; | ||
} | ||
finally { | ||
this[name][propertyKey] = null; | ||
this[name] = null; | ||
} | ||
@@ -58,0 +58,0 @@ }; |
@@ -81,3 +81,3 @@ "use strict"; | ||
await lock5.unlock(); | ||
resolve(); | ||
resolve(undefined); | ||
}, 1000); | ||
@@ -84,0 +84,0 @@ }, 1000); |
@@ -9,3 +9,2 @@ export * from './src/core'; | ||
export * from './src/network'; | ||
export * from './src/bench'; | ||
export * from './src/perf'; | ||
@@ -12,0 +11,0 @@ export * from './src/compiler'; |
{ | ||
"name": "@deepkit/core", | ||
"version": "1.0.0-y.0", | ||
"version": "1.0.1-alpha.0", | ||
"description": "Super Hornet core library", | ||
@@ -15,3 +15,2 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"benchmark": "^2.1.4", | ||
"dot-prop": "^5.1.1", | ||
@@ -36,3 +35,3 @@ "to-fast-properties": "^3.0.1" | ||
}, | ||
"gitHead": "1241496f2fa61ed23495775061355ac6e99bb18b" | ||
"gitHead": "3c0b043fdbc21f41787263bbc015749a488741ea" | ||
} |
@@ -36,2 +36,11 @@ /* | ||
} | ||
buildAsync(functionCode: string, ...args: string[]): Function { | ||
functionCode = ` | ||
return async function(${args.join(', ')}){ | ||
${functionCode} | ||
}; | ||
`; | ||
return new Function(...this.context.keys(), functionCode)(...this.context.values()); | ||
} | ||
} |
@@ -158,3 +158,3 @@ /* | ||
export function isArray(obj: any): obj is any[] { | ||
return (obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
return !!(obj && 'number' === typeof obj.length && 'function' === typeof obj.reduce); | ||
} | ||
@@ -161,0 +161,0 @@ |
@@ -57,5 +57,5 @@ /* | ||
try { | ||
return await (this as any)[name][propertyKey]; | ||
return await (this as any)[name]; | ||
} finally { | ||
(this as any)[name][propertyKey] = null; | ||
(this as any)[name] = null; | ||
} | ||
@@ -62,0 +62,0 @@ }; |
@@ -101,3 +101,3 @@ import 'jest-extended'; | ||
await lock5.unlock(); | ||
resolve(); | ||
resolve(undefined); | ||
}, 1000); | ||
@@ -104,0 +104,0 @@ }, 1000); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
2
0
501604
85
4090
- Removedbenchmark@^2.1.4
- Removedbenchmark@2.1.4(transitive)
- Removedlodash@4.17.21(transitive)
- Removedplatform@1.3.6(transitive)