Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deep-computed

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-computed - npm Package Compare versions

Comparing version 0.0.6 to 0.1.0

7

build/index.d.ts

@@ -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;

11

build/index.js
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc