@slimlib/smart-mock 0.1.2 → 0.1.4

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/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  Yet another proxy mock (YAPM?). Still in a very early state (EXPECT BUGS!).
4
4
 
5
- Mock that records operations for code generation later. Idea is somewhat similar to `prepack` but instead of interpreting code by other JS code we run it in JS VM and later use mock to repeat same operations. Ideally combined with terser like optimizer. Please check example in `pkgbld` how it is used to eject config.
5
+ Mock that records operations for code generation later. Idea is somewhat similar to `prepack` but instead of interpreting code by other JS code we run it in JS VM and later use mock to repeat the same operations. Ideally combined with a terser like optimizer. Please check the example in `pkgbld` how it is used to eject config.
6
+
7
+ [Changelog](./CHANGELOG.md)
6
8
 
7
9
  ## API
8
10
 
@@ -12,7 +14,7 @@ Default export function is a factory that creates 3 other functions with shared
12
14
 
13
15
  ### `createMock<T extends object>(object: T, name: string): T`
14
16
 
15
- Function to create mock wrapper around object and defining global name for later usage. `object` can be real original object or a pure mock object with same behavior for the specific situation. All operations on this object will be recorded by mock.
17
+ Function to create mock wrapper around object and defining global name for later usage. `object` can be a real original object or a pure mock object with the same behavior for the specific situation. All operations on this object will be recorded by mock.
16
18
 
17
19
  ### `generate(object: unknown): string`
18
20