Comparing version 0.1.10 to 0.1.11
/// <reference types="node" /> | ||
import * as x from '../library'; | ||
import * as x from 'x-value'; | ||
declare global { | ||
@@ -4,0 +4,0 @@ namespace XValue { |
@@ -5,7 +5,7 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const x = tslib_1.__importStar(require("../library")); | ||
const library_1 = require("../library"); | ||
const x = tslib_1.__importStar(require("x-value")); | ||
const toString = Object.prototype.toString; | ||
const BufferClass = globalThis.Buffer; | ||
exports.bufferTypeSymbol = Symbol(); | ||
exports.Buffer = x.atomic(exports.bufferTypeSymbol, value => (0, library_1.constraint)(value instanceof globalThis.Buffer, `Expected instance of Buffer, getting ${toString.call(value)}.`)); | ||
exports.Buffer = x.atomic(exports.bufferTypeSymbol, value => x.constraint(value instanceof BufferClass, `Expected instance of Buffer, getting ${toString.call(value)}.`)); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "x-value", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"repository": "https://github.com/vilic/x-value.git", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -1,6 +0,7 @@ | ||
import * as x from '../library'; | ||
import {constraint} from '../library'; | ||
import * as x from 'x-value'; | ||
const toString = Object.prototype.toString; | ||
const BufferClass = globalThis.Buffer; | ||
declare global { | ||
@@ -16,6 +17,6 @@ namespace XValue { | ||
export const Buffer = x.atomic(bufferTypeSymbol, value => | ||
constraint( | ||
value instanceof globalThis.Buffer, | ||
x.constraint( | ||
value instanceof BufferClass, | ||
`Expected instance of Buffer, getting ${toString.call(value)}.`, | ||
), | ||
); |
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
461545