@scurrlin/stencil 1.22.1 → 1.22.3

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/README.md +7 -19
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,32 +16,20 @@ Whether you are studying for technical interviews, or just starting your coding
16
16
 
17
17
  Most people when they attempt to memorize something study the full text and then attempt to regurgitate it on a blank page. Shocking, I know... but what if there was a step in between? What if memorization and pattern recognition weren't all or nothing games? This is where Stencil comes in.
18
18
 
19
- Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 190 "Reverse Bits":
19
+ Stencil is a language-agnostic memorization tool that strips code files down to their first letters while preserving spacing, capitalization, and punctuation. The "stencil" of the file is designed to act as a bridge between having something partially memorized and fully memorized. Below is an example of Stencil in action using LeetCode problem 192 "Word Frequency":
20
20
 
21
21
  ## Example
22
22
 
23
23
  Solution
24
24
 
25
- ```python
26
- class Solution:
27
- def reverseBits(self, n: int) -> int:
28
- result = 0
29
- for i in range(31, -1, -1):
30
- result += (n & 1) << i
31
- n >>= 1
32
- return result
25
+ ```bash
26
+ tr -s ' ' '\n' < words.txt | sort | uniq -c | sort -nr | awk '{ print $2, $1 }'
33
27
  ```
34
28
 
35
29
  Solution with Stencil
36
30
 
37
- ```python
38
- c S:
39
- d r(s, n: i) -> i:
40
- r = 0
41
- f i i r(3, -1, -1):
42
- r += (n & 1) << i
43
- n >>= 1
44
- r r
31
+ ```bash
32
+ t -s ' ' '\n' < w.t | s | u -c | s -n | a '{ p $2, $1 }'
45
33
  ```
46
34
 
47
35
  ## Local Installation
@@ -55,7 +43,7 @@ npm install @scurrlin/stencil
55
43
  Once installed, you can run it with the following command:
56
44
 
57
45
  ```bash
58
- npx stencil path/to/your/file.py --start <start_line> --end <end_line>
46
+ npx stencil path/to/your/file.sh --start <start_line> --end <end_line>
59
47
  ```
60
48
 
61
49
  ## Global Installation
@@ -69,5 +57,5 @@ npm install -g @scurrlin/stencil
69
57
  Once installed, you can run it with the following command:
70
58
 
71
59
  ```bash
72
- stencil path/to/your/file.py --start <start_line> --end <end_line>
60
+ stencil path/to/your/file.sh --start <start_line> --end <end_line>
73
61
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scurrlin/stencil",
3
- "version": "1.22.1",
3
+ "version": "1.22.3",
4
4
  "description": "A memorization tool that strips code down to first letters and punctuation only.",
5
5
  "main": "src/index.js",
6
6
  "bin": {