@poppinss/utils
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -10,8 +10,5 @@ "use strict"; | ||
*/ | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.safeEqual = void 0; | ||
const buffer_alloc_1 = __importDefault(require("buffer-alloc")); | ||
const buffer_1 = require("buffer"); | ||
const crypto_1 = require("crypto"); | ||
@@ -27,7 +24,7 @@ /** | ||
*/ | ||
const expectedLength = Buffer.byteLength(value); | ||
const expectedLength = buffer_1.Buffer.byteLength(value); | ||
/** | ||
* Value A | ||
*/ | ||
const valueBuffer = (0, buffer_alloc_1.default)(expectedLength, 0, 'utf-8'); | ||
const valueBuffer = buffer_1.Buffer.alloc(expectedLength, 0, 'utf-8'); | ||
valueBuffer.write(value); | ||
@@ -37,3 +34,3 @@ /** | ||
*/ | ||
const comparisonValueBuffer = (0, buffer_alloc_1.default)(expectedLength, 0, 'utf-8'); | ||
const comparisonValueBuffer = buffer_1.Buffer.alloc(expectedLength, 0, 'utf-8'); | ||
comparisonValueBuffer.write(comparisonValue); | ||
@@ -44,6 +41,6 @@ /** | ||
return ((0, crypto_1.timingSafeEqual)(valueBuffer, comparisonValueBuffer) && | ||
expectedLength === Buffer.byteLength(comparisonValue)); | ||
expectedLength === buffer_1.Buffer.byteLength(comparisonValue)); | ||
} | ||
return (0, crypto_1.timingSafeEqual)(Buffer.from(value), Buffer.from(comparisonValue)); | ||
return (0, crypto_1.timingSafeEqual)(buffer_1.Buffer.from(value), buffer_1.Buffer.from(comparisonValue)); | ||
} | ||
exports.safeEqual = safeEqual; |
{ | ||
"name": "@poppinss/utils", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Handy utilities for repetitive work", | ||
@@ -37,7 +37,7 @@ "main": "build/index.js", | ||
"@adonisjs/require-ts": "^2.0.8", | ||
"@poppinss/dev-utils": "^1.1.5", | ||
"@poppinss/dev-utils": "^2.0.1", | ||
"@types/fs-readdir-recursive": "^1.0.0", | ||
"@types/lodash": "^4.14.178", | ||
"@types/ms": "^0.7.31", | ||
"@types/node": "^17.0.0", | ||
"@types/node": "^17.0.8", | ||
"@types/pluralize": "0.0.29", | ||
@@ -47,3 +47,3 @@ "@types/require-all": "^3.0.3", | ||
"doctoc": "^2.1.0", | ||
"eslint": "^8.4.1", | ||
"eslint": "^8.7.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
@@ -80,3 +80,2 @@ "eslint-plugin-adonis": "^2.1.0", | ||
"@types/he": "^1.1.2", | ||
"buffer-alloc": "^1.2.0", | ||
"bytes": "^3.1.1", | ||
@@ -94,3 +93,3 @@ "change-case": "^4.1.2", | ||
"resolve-from": "^5.0.0", | ||
"slugify": "^1.6.4", | ||
"slugify": "^1.6.5", | ||
"truncatise": "0.0.8" | ||
@@ -97,0 +96,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
16
110420
2149
- Removedbuffer-alloc@^1.2.0
- Removedbuffer-alloc@1.2.0(transitive)
- Removedbuffer-alloc-unsafe@1.1.0(transitive)
- Removedbuffer-fill@1.0.0(transitive)
Updatedslugify@^1.6.5