Skip to content

Commit 9802e0e

Browse files
docs(lispy): update readme
1 parent 602c1b9 commit 9802e0e

File tree

2 files changed

+51
-5
lines changed

2 files changed

+51
-5
lines changed

packages/lispy/README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ contains the following:
7575
- `next`: remaining array items (after first)
7676
- `push`: same as `Array.prototype.push(...)`
7777
- `reduce`: list/array reduction
78+
- string/regexp processing
79+
- `capitalize`
80+
- `lower`
81+
- `upper`
82+
- `pad-left`
83+
- `pad-right`
84+
- `substr`
85+
- `trim`
86+
- `regexp`
87+
- `re-match`
88+
- `re-test`
89+
- `replace`
7890
- misc utilities
7991
- `print`: aka `console.log(...)`
8092
- `env`: JSON stringified version of current root env
@@ -114,7 +126,7 @@ For Node.js REPL:
114126
const lispy = await import("@thi.ng/lispy");
115127
```
116128

117-
Package sizes (brotli'd, pre-treeshake): ESM: 1.40 KB
129+
Package sizes (brotli'd, pre-treeshake): ESM: 1.53 KB
118130

119131
## Dependencies
120132

@@ -142,7 +154,7 @@ directory is using this package:
142154
[Generated API docs](https://docs.thi.ng/umbrella/lispy/)
143155

144156
```ts tangle:export/readme-1.ts
145-
import { evalExpressions, ENV } from "@thi.ng/lispy";
157+
import { evalSource, ENV } from "@thi.ng/lispy";
146158

147159
// define custom FFI in the root environment
148160
// (here it's actually the same as default print fn)
@@ -168,7 +180,7 @@ const SRC = `
168180
(print (env))
169181
`;
170182

171-
evalExpressions(SRC, {...ENV, name: "lispy"});
183+
evalSource(SRC, {...ENV, name: "lispy"});
172184

173185
// output:
174186
// 10
@@ -255,6 +267,17 @@ evalExpressions(SRC, {...ENV, name: "lispy"});
255267
// "count": "<function>",
256268
// "first": "<function>",
257269
// "next": "<function>",
270+
// "lower": "<function>",
271+
// "upper": "<function>",
272+
// "capitalize": "<function>",
273+
// "pad-left": "<function>",
274+
// "pad-right": "<function>",
275+
// "substr": "<function>",
276+
// "trim": "<function>",
277+
// "regexp": "<function>",
278+
// "re-test": "<function>",
279+
// "re-match": "<function>",
280+
// "replace": "<function>",
258281
// "print": "<function>",
259282
// "env": "<function>",
260283
// "partial": "<function>",

packages/lispy/tpl.readme.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ contains the following:
5454
- `next`: remaining array items (after first)
5555
- `push`: same as `Array.prototype.push(...)`
5656
- `reduce`: list/array reduction
57+
- string/regexp processing
58+
- `capitalize`
59+
- `lower`
60+
- `upper`
61+
- `pad-left`
62+
- `pad-right`
63+
- `substr`
64+
- `trim`
65+
- `regexp`
66+
- `re-match`
67+
- `re-test`
68+
- `replace`
5769
- misc utilities
5870
- `print`: aka `console.log(...)`
5971
- `env`: JSON stringified version of current root env
@@ -86,7 +98,7 @@ root environment `ENV` (see example below).
8698
{{pkg.docs}}
8799

88100
```ts tangle:export/readme-1.ts
89-
import { evalExpressions, ENV } from "@thi.ng/lispy";
101+
import { evalSource, ENV } from "@thi.ng/lispy";
90102

91103
// define custom FFI in the root environment
92104
// (here it's actually the same as default print fn)
@@ -112,7 +124,7 @@ const SRC = `
112124
(print (env))
113125
`;
114126

115-
evalExpressions(SRC, {...ENV, name: "lispy"});
127+
evalSource(SRC, {...ENV, name: "lispy"});
116128

117129
// output:
118130
// 10
@@ -199,6 +211,17 @@ evalExpressions(SRC, {...ENV, name: "lispy"});
199211
// "count": "<function>",
200212
// "first": "<function>",
201213
// "next": "<function>",
214+
// "lower": "<function>",
215+
// "upper": "<function>",
216+
// "capitalize": "<function>",
217+
// "pad-left": "<function>",
218+
// "pad-right": "<function>",
219+
// "substr": "<function>",
220+
// "trim": "<function>",
221+
// "regexp": "<function>",
222+
// "re-test": "<function>",
223+
// "re-match": "<function>",
224+
// "replace": "<function>",
202225
// "print": "<function>",
203226
// "env": "<function>",
204227
// "partial": "<function>",

0 commit comments

Comments
 (0)