@deboxsoft/module-core
Advanced tools
Comparing version 1.5.15 to 1.5.16
@@ -17,9 +17,16 @@ 'use strict'; | ||
const Container = typedi.Container.of("core"); | ||
const Token = typedi.Token; | ||
exports.Container = Container; | ||
Object.defineProperty(exports, 'Container', { | ||
enumerable: true, | ||
get: function () { | ||
return typedi.Container; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'Token', { | ||
enumerable: true, | ||
get: function () { | ||
return typedi.Token; | ||
} | ||
}); | ||
exports.DeboxError = DeboxError; | ||
exports.Logger = Logger; | ||
exports.Token = Token; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import { ContainerInstance, Token as Token$1 } from 'typedi'; | ||
export { Container, Token } from 'typedi'; | ||
@@ -73,5 +73,2 @@ interface LogFn { | ||
declare const Container: ContainerInstance; | ||
declare const Token: typeof Token$1; | ||
export { Container, DeboxError, Logger, Token }; | ||
export { DeboxError, Logger }; |
@@ -1,2 +0,2 @@ | ||
import { Container as Container$1, Token as Token$1 } from 'typedi'; | ||
export { Container, Token } from 'typedi'; | ||
@@ -13,6 +13,3 @@ class Logger { | ||
const Container = Container$1.of("core"); | ||
const Token = Token$1; | ||
export { Container, DeboxError, Logger, Token }; | ||
export { DeboxError, Logger }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "1.5.15", | ||
"version": "1.5.16", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -21,9 +21,8 @@ "maintainers": [ | ||
"copy:license": "cpx ../../LICENSE ./", | ||
"copy": "run-p copy:*", | ||
"clean": "rimraf libs dist", | ||
"build": "rollup -c", | ||
"test": "jest --passWithNoTests", | ||
"typecheck:eslint": "eslint --fix src/**/*", | ||
"typecheck:tsc": "tsc --noEmit", | ||
"typecheck": "run-p typecheck:*" | ||
"copy": "yarn copy:license", | ||
"build": "yarn r:rollup -c ../../scripts/rollup/core.config.js", | ||
"test": "yarn r:jest --passWithNoTests", | ||
"typecheck:eslint": "yarn r:eslint --fix src/**/*", | ||
"typecheck:tsc": "yarn r:tsc --noEmit", | ||
"typecheck": "yarn r:run-p typecheck:tsc typecheck:eslint" | ||
}, | ||
@@ -37,3 +36,7 @@ "dependencies": { | ||
}, | ||
"gitHead": "22a10c802b6c1fd2195617a0b3237aa71f19e66b" | ||
"devDependencies": { | ||
"@nurdiansyah/rollup": "^1.3.2", | ||
"@types/node": "^14.14.20" | ||
}, | ||
"gitHead": "6a4189ab261ec8f9ebea4bf5a3c678082bb13e57" | ||
} |
@@ -26,4 +26,4 @@ 'use strict'; | ||
function isString(str) { | ||
if (str && typeof str.valueOf() === "string") { | ||
function isString(value) { | ||
if (value && typeof value.valueOf() === "string") { | ||
return true; | ||
@@ -44,3 +44,3 @@ } | ||
function debounce(func, wait, immediate = false) { | ||
function debounce(func, wait = 150, immediate = false) { | ||
var timeout; | ||
@@ -78,4 +78,2 @@ return function() { | ||
const isEmpty = (obj) => [Object, Array].includes((obj || {}).constructor) && !Object.entries(obj || {}).length; | ||
function throttle(func, timeFrame) { | ||
@@ -102,3 +100,2 @@ var lastTime = 0; | ||
exports.debounce = debounce; | ||
exports.isEmpty = isEmpty; | ||
exports.isObject = isObject; | ||
@@ -105,0 +102,0 @@ exports.isPlainObject = isPlainObject; |
@@ -17,3 +17,3 @@ export * from 'change-case'; | ||
*/ | ||
declare function isString(str: any): boolean; | ||
declare function isString(value: any): boolean; | ||
@@ -30,3 +30,3 @@ /** | ||
*/ | ||
declare function pickBy(object: Record<string, any>): Record<string, any>; | ||
declare function pickBy(object: any): {}; | ||
@@ -44,3 +44,3 @@ /** | ||
*/ | ||
declare function debounce(func: Function, wait: number, immediate?: boolean): () => void; | ||
declare function debounce(func: Function, wait?: number, immediate?: boolean): () => void; | ||
@@ -66,3 +66,3 @@ /** | ||
*/ | ||
declare const clamp: (number: number, boundOne: number, boundTwo?: number | undefined) => number; | ||
declare const clamp: (number: number, boundOne: number, boundTwo?: number) => number; | ||
@@ -74,12 +74,5 @@ /** | ||
*/ | ||
declare function pull(arr: any[], ...removeList: any[]): any[]; | ||
declare function pull(arr: any[], ...removeList: any): any[]; | ||
/** | ||
* Checks if value is an empty object or collection. | ||
* ❗Note that the Native version does not support evaluating a Set or a Map | ||
* @param obj | ||
*/ | ||
declare const isEmpty: (obj: any) => boolean; | ||
/** | ||
* Create a new function that limits calls to func to once every given timeframe | ||
@@ -92,4 +85,4 @@ * @param func | ||
*/ | ||
declare function throttle(func: Function, timeFrame: number): () => void; | ||
declare function throttle(func: any, timeFrame: any): () => void; | ||
export { clamp, debounce, isEmpty, isObject, isPlainObject, isString, pickBy, pull, throttle }; | ||
export { clamp, debounce, isObject, isPlainObject, isString, pickBy, pull, throttle }; |
10
utils.js
@@ -22,4 +22,4 @@ export * from 'change-case'; | ||
function isString(str) { | ||
if (str && typeof str.valueOf() === "string") { | ||
function isString(value) { | ||
if (value && typeof value.valueOf() === "string") { | ||
return true; | ||
@@ -40,3 +40,3 @@ } | ||
function debounce(func, wait, immediate = false) { | ||
function debounce(func, wait = 150, immediate = false) { | ||
var timeout; | ||
@@ -74,4 +74,2 @@ return function() { | ||
const isEmpty = (obj) => [Object, Array].includes((obj || {}).constructor) && !Object.entries(obj || {}).length; | ||
function throttle(func, timeFrame) { | ||
@@ -88,3 +86,3 @@ var lastTime = 0; | ||
export { clamp, debounce, isEmpty, isObject, isPlainObject, isString, pickBy, pull, throttle }; | ||
export { clamp, debounce, isObject, isPlainObject, isString, pickBy, pull, throttle }; | ||
//# sourceMappingURL=utils.js.map |
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
31
695
32379
2