kintone-pretty-fields 0.3.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 (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +12 -10
  3. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Cybozu, Inc.
3
+ Copyright (c) cy-takeuchi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -117,22 +117,24 @@ 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
137
139
 
138
- - [MIT](https://github.com/kintone/js-sdk/tree/master/LICENSE)
140
+ - [MIT](https://github.com/cy-takeuchi/kintone-pretty-fields/blob/main/LICENSE)
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "0.3.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",