@alwatr/flat-string 1.0.0 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -3,12 +3,24 @@
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.2](https://github.com/Alwatr/nanolib/compare/@alwatr/flat-string@1.0.1...@alwatr/flat-string@1.0.2) (2023-12-22)
7
+
8
+ ### Bug Fixes
9
+
10
+ * package.json include files ([053fc10](https://github.com/Alwatr/nanolib/commit/053fc10b518038647136db9ada2433e27ecb2e63)) by @AliMD
11
+
12
+ ## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/flat-string@1.0.0...@alwatr/flat-string@1.0.1) (2023-12-21)
13
+
14
+ ### Features
15
+
16
+ * **prettier-config:** new package for prettier share configs ([a6fdee3](https://github.com/Alwatr/nanolib/commit/a6fdee34591abb1d19e7ea7e431bd6624e2ea6d4)) by @AliMD
17
+
6
18
  # 1.0.0 (2023-12-20)
7
19
 
8
20
  ### Bug Fixes
9
21
 
10
- * build process ([83fc4e6](https://github.com/Alwatr/nanolib/commit/83fc4e609f86c25291e5f89016d6777bf197ffcb)) by @AliMD
22
+ - build process ([83fc4e6](https://github.com/Alwatr/nanolib/commit/83fc4e609f86c25291e5f89016d6777bf197ffcb)) by @AliMD
11
23
 
12
24
  ### Features
13
25
 
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
26
+ - **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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alwatr/flat-string",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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": [
@@ -27,7 +27,10 @@
27
27
  },
28
28
  "license": "MIT",
29
29
  "files": [
30
- "**/*.{d.ts.map,d.ts,js.map,js,html,md,cjs,mjs,cjs.map,mjs.map}"
30
+ "package.json",
31
+ "README.md",
32
+ "CHANGELOG.md",
33
+ "dist/**/*"
31
34
  ],
32
35
  "publishConfig": {
33
36
  "access": "public"
@@ -41,6 +44,7 @@
41
44
  "bugs": {
42
45
  "url": "https://github.com/Alwatr/nanolib/issues"
43
46
  },
47
+ "prettier": "@alwatr/prettier-config",
44
48
  "scripts": {
45
49
  "b": "yarn run build",
46
50
  "w": "yarn run watch",
@@ -56,9 +60,10 @@
56
60
  "clean": "rm -rfv dist .tsbuildinfo"
57
61
  },
58
62
  "devDependencies": {
59
- "@alwatr/nano-build": "^1.0.0",
60
- "@alwatr/tsconfig-base": "^1.0.0",
63
+ "@alwatr/nano-build": "^1.0.2",
64
+ "@alwatr/prettier-config": "^1.0.2",
65
+ "@alwatr/tsconfig-base": "^1.0.2",
61
66
  "typescript": "^5.3.3"
62
67
  },
63
- "gitHead": "1896de798973e9de67df6d20e8451a957b985636"
68
+ "gitHead": "db09e86c37b72ccdfba24098a29e49b0834535a6"
64
69
  }
package/dist/main.cjs DELETED
@@ -1,3 +0,0 @@
1
- /* @alwatr/flat-string v1.0.0 */
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
- //# sourceMappingURL=main.cjs.map
package/dist/main.cjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["main_exports", "__export", "flatString", "__toCommonJS", "str"]
7
- }
package/dist/main.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * This function simplifies the complex C structures that are part of a combined JavaScript string.
3
- *
4
- * @param str The string to flatten.
5
- * @returns The flattened string.
6
- * @example
7
- * ```typescript
8
- * flatString(myStr);
9
- * ```
10
- */
11
- export declare function flatString(str: string): string;
12
- //# sourceMappingURL=main.d.ts.map
@@ -1 +0,0 @@
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"}
package/dist/main.mjs DELETED
@@ -1,3 +0,0 @@
1
- /* @alwatr/flat-string v1.0.0 */
2
- function t(n){return n|0,n}export{t as flatString};
3
- //# sourceMappingURL=main.mjs.map
package/dist/main.mjs.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 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",
6
- "names": ["flatString", "str"]
7
- }