Skip to content

Commit

Permalink
Fix falsy on λ
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorLuizC committed Jul 17, 2018
1 parent d34c7b9 commit 5e72195
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reconstruct-descriptors",
"version": "0.2.0",
"version": "0.2.1",
"description": "Deeply reconstruct any object iterating over its property descriptors.",
"main": "dist/reconstruct-descriptors.cjs.js",
"types": "types/index.d.ts",
Expand Down Expand Up @@ -45,6 +45,6 @@
},
"dependencies": {
"object.getownpropertydescriptors": "^2.0.3",
"reconstruct": "^0.2.0"
"reconstruct": "^0.2.1"
}
}
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import reconstruct from 'reconstruct';
import descriptors from 'object.getownpropertydescriptors';

export type Falsy = '' | 0 | false | null | undefined;

export type PropertyName = string | symbol | number;

export type ReconstructΛ = (descriptor: PropertyDescriptor, property: PropertyName) => PropertyDescriptorMap;
export type ReconstructΛ = (
descriptor: PropertyDescriptor,
property: PropertyName
) => PropertyDescriptorMap | Falsy;

/**
* Deeply reconstruct any object iterating over its property descriptors.
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3724,9 +3724,9 @@ readdirp@^2.0.0:
readable-stream "^2.0.2"
set-immediate-shim "^1.0.1"

reconstruct@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/reconstruct/-/reconstruct-0.2.0.tgz#1f78e45f246578c21b43c8b47740fb20da806175"
reconstruct@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/reconstruct/-/reconstruct-0.2.1.tgz#829becfd959d8085055efa1e4d99803869de9b1e"
dependencies:
object-assign "^4.1.1"
object-keys "^1.0.12"
Expand Down

0 comments on commit 5e72195

Please sign in to comment.