Skip to content

Commit 8ee9002

Browse files
Joshua Alvaradofacebook-github-bot
authored andcommitted
Add flow strict typing to isEmpty
Summary: Add flow strict typing to the isEmpty lib Reviewed By: wcheng86 Differential Revision: D9200520 fbshipit-source-id: ac5717216199166e7485abcdfcba03ab2bbe90d2
1 parent f536a0c commit 8ee9002

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/vendor/core/isEmpty.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7+
* @flow strict
78
* @format
89
*/
910

@@ -12,7 +13,7 @@
1213
/**
1314
* Mimics empty from PHP.
1415
*/
15-
function isEmpty(obj) {
16+
function isEmpty(obj: mixed): boolean {
1617
if (Array.isArray(obj)) {
1718
return obj.length === 0;
1819
} else if (typeof obj === 'object') {

0 commit comments

Comments
 (0)