Comparing version 3.3.0 to 3.4.0
@@ -47,2 +47,5 @@ "use strict"; | ||
this.mounted = false; | ||
if (this.delayId) { | ||
clearTimeout(this.delayId); | ||
} | ||
}; | ||
@@ -49,0 +52,0 @@ BaseForm.prototype.getContext = function () { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.joinName = void 0; | ||
var tslib_1 = require("tslib"); | ||
function joinName() { | ||
@@ -9,9 +10,24 @@ var parts = []; | ||
} | ||
var name = parts.reduce(function (parts, part) { | ||
return part || part === 0 | ||
? parts.concat(typeof part === 'string' ? part.split('.') : part) | ||
: parts; | ||
}, []); | ||
return parts[0] === null ? name.map(function (part) { return '' + part; }) : name.join('.'); | ||
var name = []; | ||
for (var index = 0; index !== parts.length; ++index) { | ||
var part = parts[index]; | ||
if (part || part === 0) { | ||
if (typeof part === 'string') { | ||
if (part.indexOf('.') !== -1) { | ||
name.push.apply(name, part.split('.')); | ||
} | ||
else { | ||
name.push(part); | ||
} | ||
} | ||
else if (Array.isArray(part)) { | ||
parts.splice.apply(parts, tslib_1.__spreadArrays([index--, 1], part)); | ||
} | ||
else { | ||
name.push('' + part); | ||
} | ||
} | ||
} | ||
return parts[0] === null ? name : name.join('.'); | ||
} | ||
exports.joinName = joinName; |
@@ -38,2 +38,5 @@ import clone from 'lodash/clone'; | ||
this.mounted = false; | ||
if (this.delayId) { | ||
clearTimeout(this.delayId); | ||
} | ||
} | ||
@@ -40,0 +43,0 @@ getContext() { |
export function joinName(...parts) { | ||
const name = parts.reduce((parts, part) => part || part === 0 | ||
? parts.concat(typeof part === 'string' ? part.split('.') : part) | ||
: parts, []); | ||
return parts[0] === null ? name.map(part => '' + part) : name.join('.'); | ||
const name = []; | ||
for (let index = 0; index !== parts.length; ++index) { | ||
const part = parts[index]; | ||
if (part || part === 0) { | ||
if (typeof part === 'string') { | ||
if (part.indexOf('.') !== -1) { | ||
name.push(...part.split('.')); | ||
} | ||
else { | ||
name.push(part); | ||
} | ||
} | ||
else if (Array.isArray(part)) { | ||
parts.splice(index--, 1, ...part); | ||
} | ||
else { | ||
name.push('' + part); | ||
} | ||
} | ||
} | ||
return parts[0] === null ? name : name.join('.'); | ||
} |
{ | ||
"name": "uniforms", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"license": "MIT", | ||
@@ -44,3 +44,3 @@ "main": "es5/index.js", | ||
}, | ||
"gitHead": "657ad910c64f6347458d128ecaea7c1c7bc8e23d" | ||
"gitHead": "6a21f52ab2d804c4e558ea9d6cf4ea3013d5a9d5" | ||
} |
export function joinName(flag: null, ...parts: unknown[]): string[]; | ||
export function joinName(...parts: unknown[]): string; | ||
export function joinName(...parts: unknown[]) { | ||
const name = parts.reduce( | ||
(parts: unknown[], part: unknown) => | ||
part || part === 0 | ||
? parts.concat(typeof part === 'string' ? part.split('.') : part) | ||
: parts, | ||
[], | ||
); | ||
const name: string[] = []; | ||
for (let index = 0; index !== parts.length; ++index) { | ||
const part = parts[index]; | ||
if (part || part === 0) { | ||
if (typeof part === 'string') { | ||
if (part.indexOf('.') !== -1) { | ||
name.push(...part.split('.')); | ||
} else { | ||
name.push(part); | ||
} | ||
} else if (Array.isArray(part)) { | ||
parts.splice(index--, 1, ...part); | ||
} else { | ||
name.push('' + part); | ||
} | ||
} | ||
} | ||
return parts[0] === null ? name.map(part => '' + part) : name.join('.'); | ||
return parts[0] === null ? name : name.join('.'); | ||
} |
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
200348
4593