deep-computed
Advanced tools
Comparing version 0.0.6 to 0.1.0
@@ -1,1 +0,6 @@ | ||
export declare const deepComputed: <O, T, R = O>(obj: O) => T; | ||
declare type RecursiveComputable<T, Root> = { | ||
[K in keyof T]: T[K] extends object ? RecursiveComputable<T[K], Root> : T[K] | ((arg: Root) => T[K]); | ||
}; | ||
export declare type Computable<T> = RecursiveComputable<T, T>; | ||
export declare const deepComputed: <O>(obj: RecursiveComputable<O, O>) => O; | ||
export default deepComputed; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var isObject = function (obj) { | ||
return Object.prototype.toString.call(obj) === '[object Object]'; | ||
return Object.prototype.toString.call(obj) === "[object Object]"; | ||
}; | ||
var isFunction = function (obj) { | ||
return typeof obj === 'function'; | ||
}; | ||
var isFunction = function (obj) { return typeof obj === "function"; }; | ||
var empty = function (obj) { | ||
@@ -57,3 +55,6 @@ if (isObject(obj)) { | ||
} | ||
exports.deepComputed = function (obj) { return defineProperties(obj); }; | ||
exports.deepComputed = function (obj) { | ||
return defineProperties(obj); | ||
}; | ||
exports.default = exports.deepComputed; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "deep-computed", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"description": "Iterates over objects and arrays and transforms functions to computed properties", | ||
@@ -13,7 +13,7 @@ "main": "./build/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^19.2.3", | ||
"jest": "^20.0.4", | ||
"np": "^2.15.0", | ||
"ts-jest": "^20.0.4", | ||
"typescript": "^2.3.3" | ||
"@types/jest": "^24.0.11", | ||
"jest": "^24.7.1", | ||
"np": "^4.0.2", | ||
"ts-jest": "^24.0.2", | ||
"typescript": "^3.4.3" | ||
}, | ||
@@ -23,3 +23,3 @@ "scripts": { | ||
"build": "rm -rf build && tsc --outDir build -d", | ||
"prepublish": "npm build", | ||
"prepublish": "yarn build", | ||
"np": "np" | ||
@@ -29,8 +29,7 @@ }, | ||
"transform": { | ||
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
".ts": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", | ||
"testRegex": "\\.test\\.ts$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
@@ -37,0 +36,0 @@ ] |
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
64
5068
5