inibase 1.1.0 → 1.1.2

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/dist/file.js +4 -2
  2. package/package.json +1 -1
package/dist/file.js CHANGED
@@ -106,7 +106,9 @@ const secureString = (input) => {
106
106
  * @returns The secured and/or joined string.
107
107
  */
108
108
  export const encode = (input) => Array.isArray(input)
109
- ? input.every((_input) => typeof _input === "string" && isStringified(_input))
109
+ ? input.every((_input) => _input === null ||
110
+ _input === undefined ||
111
+ (typeof _input === "string" && isStringified(_input)))
110
112
  ? `[${input.join(",")}]`
111
113
  : Inison.stringify(input)
112
114
  : secureString(input);
@@ -423,7 +425,7 @@ export const prepend = async (filePath, data) => {
423
425
  transform(line, _, callback) {
424
426
  if (!isAppended) {
425
427
  isAppended = true;
426
- return callback(null, `${Array.isArray(data) ? data.join("\n") : data}\n${line.length ? `${line}\n` : ""}`);
428
+ return callback(null, `${Array.isArray(data) ? data.join("\n") : data}\n${`${line}\n`}`);
427
429
  }
428
430
  return callback(null, `${line}\n`);
429
431
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Karim Amahtil",