@alwatr/flat-string 1.0.0 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -3,12 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/flat-string@1.0.0...@alwatr/flat-string@1.0.1) (2023-12-21)
7
+
8
+ ### Features
9
+
10
+ * **prettier-config:** new package for prettier share configs ([a6fdee3](https://github.com/Alwatr/nanolib/commit/a6fdee34591abb1d19e7ea7e431bd6624e2ea6d4)) by @AliMD
11
+
6
12
  # 1.0.0 (2023-12-20)
7
13
 
8
14
  ### Bug Fixes
9
15
 
10
- * build process ([83fc4e6](https://github.com/Alwatr/nanolib/commit/83fc4e609f86c25291e5f89016d6777bf197ffcb)) by @AliMD
16
+ - build process ([83fc4e6](https://github.com/Alwatr/nanolib/commit/83fc4e609f86c25291e5f89016d6777bf197ffcb)) by @AliMD
11
17
 
12
18
  ### Features
13
19
 
14
- * **flat-string:** add new package for simplifies the complex C structures that are part of a combined JavaScript string ([ebfdcb3](https://github.com/Alwatr/nanolib/commit/ebfdcb368bc111e59d6b920f572d6365eef62144)) by @AliMD
20
+ - **flat-string:** add new package for simplifies the complex C structures that are part of a combined JavaScript string ([ebfdcb3](https://github.com/Alwatr/nanolib/commit/ebfdcb368bc111e59d6b920f572d6365eef62144)) by @AliMD
package/README.md CHANGED
@@ -5,3 +5,17 @@ This function simplifies the complex C structures that are part of a combined Ja
5
5
  If you're frequently combining strings and then using that combined string somewhere else, you might discover that running your string through `flatString` significantly enhances performance.
6
6
 
7
7
  In simpler terms, `flatString` is a function that optimizes the way strings are stored in memory in JavaScript. When you concatenate strings, JavaScript internally creates a complex structure to save memory. However, when you need to use this string, for example, to write it to a file or send it over the network, this complex structure needs to be flattened, which can take time. By using `flatString`, you flatten the string right after concatenation, making the subsequent use of the string faster.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ yarn add @alwatr/flat-string
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import flatString from '@alwatr/flat-string';
19
+
20
+ myStr = flatString(myStr);
21
+ ```
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /* @alwatr/flat-string v1.0.0 */
1
+ /* @alwatr/flat-string v1.0.1 */
2
2
  "use strict";var g=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(n,t)=>{for(var i in t)g(n,i,{get:t[i],enumerable:!0})},c=(n,t,i,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of o(t))!u.call(n,r)&&r!==i&&g(n,r,{get:()=>t[r],enumerable:!(e=f(t,r))||e.enumerable});return n};var l=n=>c(g({},"__esModule",{value:!0}),n);var s={};a(s,{flatString:()=>p});module.exports=l(s);function p(n){return n|0,n}0&&(module.exports={flatString});
3
3
  //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
- "sourcesContent": ["/**\n * This function simplifies the complex C structures that are part of a combined JavaScript string.\n *\n * @param str The string to flatten.\n * @returns The flattened string.\n * @example\n * ```typescript\n * flatString(myStr);\n * ```\n */\nexport function flatString (str: string): string {\n // @ts-expect-error because it alters wrong compilation errors.\n str | 0;\n return str;\n}\n"],
5
- "mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAUO,SAASE,EAAYE,EAAqB,CAE/C,OAAAA,EAAM,EACCA,CACT",
4
+ "sourcesContent": ["/**\n * This function simplifies the complex C structures that are part of a combined JavaScript string.\n *\n * @param str The string to flatten.\n * @returns The flattened string.\n * @example\n * ```typescript\n * myStr = flatString(myStr);\n * ```\n */\nexport function flatString(str: string): string {\n // @ts-expect-error because it alters wrong compilation errors.\n str | 0;\n return str;\n}\n"],
5
+ "mappings": ";yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,IAAA,eAAAC,EAAAH,GAUO,SAASE,EAAWE,EAAqB,CAE9C,OAAAA,EAAM,EACCA,CACT",
6
6
  "names": ["main_exports", "__export", "flatString", "__toCommonJS", "str"]
7
7
  }
package/dist/main.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * @returns The flattened string.
6
6
  * @example
7
7
  * ```typescript
8
- * flatString(myStr);
8
+ * myStr = flatString(myStr);
9
9
  * ```
10
10
  */
11
11
  export declare function flatString(str: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAI/C"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI9C"}
package/dist/main.mjs CHANGED
@@ -1,3 +1,3 @@
1
- /* @alwatr/flat-string v1.0.0 */
1
+ /* @alwatr/flat-string v1.0.1 */
2
2
  function t(n){return n|0,n}export{t as flatString};
3
3
  //# sourceMappingURL=main.mjs.map
package/dist/main.mjs.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/main.ts"],
4
- "sourcesContent": ["/**\n * This function simplifies the complex C structures that are part of a combined JavaScript string.\n *\n * @param str The string to flatten.\n * @returns The flattened string.\n * @example\n * ```typescript\n * flatString(myStr);\n * ```\n */\nexport function flatString (str: string): string {\n // @ts-expect-error because it alters wrong compilation errors.\n str | 0;\n return str;\n}\n"],
5
- "mappings": ";AAUO,SAASA,EAAYC,EAAqB,CAE/C,OAAAA,EAAM,EACCA,CACT",
4
+ "sourcesContent": ["/**\n * This function simplifies the complex C structures that are part of a combined JavaScript string.\n *\n * @param str The string to flatten.\n * @returns The flattened string.\n * @example\n * ```typescript\n * myStr = flatString(myStr);\n * ```\n */\nexport function flatString(str: string): string {\n // @ts-expect-error because it alters wrong compilation errors.\n str | 0;\n return str;\n}\n"],
5
+ "mappings": ";AAUO,SAASA,EAAWC,EAAqB,CAE9C,OAAAA,EAAM,EACCA,CACT",
6
6
  "names": ["flatString", "str"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/flat-string",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "The `flat-string` function flattens the underlying C structures of a concatenated JavaScript string.",
5
5
  "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
6
6
  "keywords": [
@@ -41,6 +41,7 @@
41
41
  "bugs": {
42
42
  "url": "https://github.com/Alwatr/nanolib/issues"
43
43
  },
44
+ "prettier": "@alwatr/prettier-config",
44
45
  "scripts": {
45
46
  "b": "yarn run build",
46
47
  "w": "yarn run watch",
@@ -56,9 +57,10 @@
56
57
  "clean": "rm -rfv dist .tsbuildinfo"
57
58
  },
58
59
  "devDependencies": {
59
- "@alwatr/nano-build": "^1.0.0",
60
- "@alwatr/tsconfig-base": "^1.0.0",
60
+ "@alwatr/nano-build": "^1.0.1",
61
+ "@alwatr/prettier-config": "^1.0.1",
62
+ "@alwatr/tsconfig-base": "^1.0.1",
61
63
  "typescript": "^5.3.3"
62
64
  },
63
- "gitHead": "1896de798973e9de67df6d20e8451a957b985636"
65
+ "gitHead": "e6e833d520bf19e616113916a23af8c11282cb50"
64
66
  }