@d-fischer/shared-utils
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,3 +1,5 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export default function NonEnumerable(target, key) { | ||
function NonEnumerable(target, key) { | ||
// first property defined in prototype, that's why we use getters/setters | ||
@@ -21,2 +23,3 @@ // (otherwise assignment in object will override property in prototype) | ||
} | ||
exports.default = NonEnumerable; | ||
//# sourceMappingURL=NonEnumerable.js.map |
@@ -1,6 +0,9 @@ | ||
import { __read, __spread } from "tslib"; | ||
export default function flatten(arr) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function flatten(arr) { | ||
var _a; | ||
return (_a = []).concat.apply(_a, __spread(arr)); | ||
return (_a = []).concat.apply(_a, tslib_1.__spread(arr)); | ||
} | ||
exports.default = flatten; | ||
//# sourceMappingURL=flatten.js.map |
@@ -1,5 +0,8 @@ | ||
import { __read, __spread } from "tslib"; | ||
export default function arrayToObject(arr, fn) { | ||
return Object.assign.apply(Object, __spread([{}], arr.map(fn))); | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function arrayToObject(arr, fn) { | ||
return Object.assign.apply(Object, tslib_1.__spread([{}], arr.map(fn))); | ||
} | ||
exports.default = arrayToObject; | ||
//# sourceMappingURL=arrayToObject.js.map |
@@ -1,10 +0,13 @@ | ||
import { __read } from "tslib"; | ||
import arrayToObject from './arrayToObject'; | ||
export default function entriesToObject(obj) { | ||
return arrayToObject(obj, function (_a) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var arrayToObject_1 = require("./arrayToObject"); | ||
function entriesToObject(obj) { | ||
return arrayToObject_1.default(obj, function (_a) { | ||
var _b; | ||
var _c = __read(_a, 2), key = _c[0], val = _c[1]; | ||
var _c = tslib_1.__read(_a, 2), key = _c[0], val = _c[1]; | ||
return (_b = {}, _b[key] = val, _b); | ||
}); | ||
} | ||
exports.default = entriesToObject; | ||
//# sourceMappingURL=entriesToObject.js.map |
@@ -1,3 +0,5 @@ | ||
import arrayToObject from './arrayToObject'; | ||
export default function indexBy(arr, keyFn) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var arrayToObject_1 = require("./arrayToObject"); | ||
function indexBy(arr, keyFn) { | ||
if (typeof keyFn !== 'function') { | ||
@@ -7,3 +9,3 @@ var key_1 = keyFn; | ||
} | ||
return arrayToObject(arr, function (val) { | ||
return arrayToObject_1.default(arr, function (val) { | ||
var _a; | ||
@@ -13,2 +15,3 @@ return (_a = {}, _a[keyFn(val)] = val, _a); | ||
} | ||
exports.default = indexBy; | ||
//# sourceMappingURL=indexBy.js.map |
@@ -1,3 +0,5 @@ | ||
import { __read, __spread } from "tslib"; | ||
export default function mapObject(obj, fn) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function mapObject(obj, fn) { | ||
var mapped = Object.entries(obj).map( | ||
@@ -7,7 +9,8 @@ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions | ||
var _b; | ||
var _c = __read(_a, 2), key = _c[0], value = _c[1]; | ||
var _c = tslib_1.__read(_a, 2), key = _c[0], value = _c[1]; | ||
return (_b = {}, _b[key] = fn(value, key), _b); | ||
}); | ||
return Object.assign.apply(Object, __spread([{}], mapped)); | ||
return Object.assign.apply(Object, tslib_1.__spread([{}], mapped)); | ||
} | ||
exports.default = mapObject; | ||
//# sourceMappingURL=mapObject.js.map |
@@ -1,5 +0,8 @@ | ||
import { __read, __spread } from "tslib"; | ||
export default function utf8Length(str) { | ||
return __spread(str).length; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function utf8Length(str) { | ||
return tslib_1.__spread(str).length; | ||
} | ||
exports.default = utf8Length; | ||
//# sourceMappingURL=utf8Length.js.map |
@@ -1,5 +0,8 @@ | ||
import { __read, __spread } from "tslib"; | ||
export default function utf8Substring(str, start, end) { | ||
return __spread(str).slice(start, end).join(''); | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
function utf8Substring(str, start, end) { | ||
return tslib_1.__spread(str).slice(start, end).join(''); | ||
} | ||
exports.default = utf8Substring; | ||
//# sourceMappingURL=utf8Substring.js.map |
@@ -1,9 +0,19 @@ | ||
export { default as NonEnumerable } from './decorators/NonEnumerable'; | ||
export { default as flatten } from './functions/array/flatten'; | ||
export { default as arrayToObject } from './functions/object/arrayToObject'; | ||
export { default as entriesToObject } from './functions/object/entriesToObject'; | ||
export { default as indexBy } from './functions/object/indexBy'; | ||
export { default as mapObject } from './functions/object/mapObject'; | ||
export { default as utf8Length } from './functions/string/utf8Length'; | ||
export { default as utf8Substring } from './functions/string/utf8Substring'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NonEnumerable_1 = require("./decorators/NonEnumerable"); | ||
exports.NonEnumerable = NonEnumerable_1.default; | ||
var flatten_1 = require("./functions/array/flatten"); | ||
exports.flatten = flatten_1.default; | ||
var arrayToObject_1 = require("./functions/object/arrayToObject"); | ||
exports.arrayToObject = arrayToObject_1.default; | ||
var entriesToObject_1 = require("./functions/object/entriesToObject"); | ||
exports.entriesToObject = entriesToObject_1.default; | ||
var indexBy_1 = require("./functions/object/indexBy"); | ||
exports.indexBy = indexBy_1.default; | ||
var mapObject_1 = require("./functions/object/mapObject"); | ||
exports.mapObject = mapObject_1.default; | ||
var utf8Length_1 = require("./functions/string/utf8Length"); | ||
exports.utf8Length = utf8Length_1.default; | ||
var utf8Substring_1 = require("./functions/string/utf8Substring"); | ||
exports.utf8Substring = utf8Substring_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Constructor.js.map |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=MakeOptional.js.map |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=object.js.map |
{ | ||
"name": "@d-fischer/shared-utils", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
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
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
20266
62
227