kintone-pretty-fields 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -117,20 +117,22 @@ Here is a sample code that retrieves form fields of an app.
117
117
 
118
118
  ```ts
119
119
  import { KintoneRestAPIClient } from "@kintone/rest-api-client";
120
- import { kintonePrettyFields } from "kintone-pretty-fields";
120
+ import { kintonePrettyFields, kintonePrettyType } from "kintone-pretty-fields";
121
121
 
122
122
  const client = new KintoneRestAPIClient();
123
123
  const { fields, spacers } = await kintonePrettyFields.get({ client, app: 1, lang: "en", preview: false });
124
124
  console.log({ fields, spacers });
125
125
 
126
- for (const field of fields) {
127
- if (kintonePrettyFields.isSingleLineText(field)) {
128
- // do something
129
- }
130
- if (kintonePrettyFields.isDate(field)) {
131
- // do something
132
- }
133
- }
126
+ const checkBoxFields = fields.filter(kintonePrettyFields.isCheckBox);
127
+ console.log(checkBoxFields);
128
+
129
+ const myFunction1 = (fields: kintonePrettyType.OneOf[]) => {
130
+ // do something
131
+ };
132
+
133
+ const myFunction2 = (field: kintonePrettyType.CheckBox) => {
134
+ // do something
135
+ };
134
136
  ```
135
137
 
136
138
  ## License
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "0.4.0",
7
+ "version": "0.4.1",
8
8
  "description": "Retrieve kintone form field(@kintone/rest-api-client) information in a pretty format.",
9
9
  "repository": {
10
10
  "type": "git",