Skip to content

Commit a33dc71

Browse files
author
Christopher J. Brody
committed
test & doc lib API for platforms: Array | String
Rationale: both cases work out since the following code in lib/lib.js works properly regardless of whether platforms is an array or a comma-separated string: if (template.platform) { return (platforms.indexOf(template.platform) >= 0); } This case demonstrates an example of the flexibility of JavaScript.
1 parent d8bf381 commit a33dc71

File tree

5 files changed

+1599
-1
lines changed

5 files changed

+1599
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ createLibraryModule({
121121
prefix: String, /* The prefix for the library (Default: ``) */
122122
moduleName: String, /* The module library package name to be used in package.json. Default: react-native-(name in param-case) */
123123
modulePrefix: String, /* The module prefix for the library, ignored if moduleName is specified (Default: react-native) */
124-
platforms: Array, /* Platforms the library will be created for. (Default: ['ios', 'android']) */
124+
platforms: Array | String, /* Platforms the library will be created for. (Default: ['android', 'ios']) */
125125
packageIdentifier: String, /* (Android only!) The package name for the Android module (Default: com.reactlibrary) */
126126
githubAccount: String, /* The github account where the library is hosted (Default: `github_account`) */
127127
authorName: String, /* The author's name (Default: `Your Name`) */

0 commit comments

Comments
 (0)