You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,16 @@ Objix is a delightfully convienient, high performance, zero dependency and super
4
4
5
5
The functions are all non enumerable and include copies of Object class methods and Array prototype methods applied to the values of the object as well others to delete keys, stringify, promisify, memoize, compare, split/join objects, check types, log messages and trapping/observing property assignments.
6
6
7
-
This library is highly optimised with zero copy operations where possible. The source is only 3.5kb (2.6kb minified) which allows for fast loading and easy integration without additional compilation or tree shaking. There is however limited type checking to guard against unwanted side effects, and there may be some undiscovered edge case that do not behave as expected. Performance in most cases is significantly faster than `lodash` equivalents especially when working with small objects. For example `ob.map(fn)` is typically over 65% faster than `_.mapValues(ob, fn)` and some operations such as `pick` can be several thousand times quicker according to simple [benchmarks](docs/bench.md).
7
+
This library is highly optimised with zero copy operations where possible. The source is only 3.8kb (2.8kb minified) which allows for fast loading and easy integration without additional compilation or tree shaking. Performance in most cases is significantly faster than `lodash` equivalents especially when working with small objects. For example `ob._map(fn)` is typically over 65% faster than `_.mapValues(ob, fn)` and some operations such as `pick` can be several thousand times quicker according to simple [benchmarks](docs/bench.md).
8
8
9
9
Interactive docs and demos are availble on https://objix.dev/#/docs/api.
10
10
11
+
## Upgrading from 1.0
12
+
13
+
Objix 2.0 now prefixes all prototype methods with '_'. This avoids name clashes with built in methods and reduces unwanted side effects and compatibility issues inherent in the 1.x releases.
14
+
15
+
The `_size()` method is now renamied to `_len()`.
16
+
11
17
## Getting Started - Node
12
18
13
19
- Install:
@@ -20,7 +26,7 @@ Interactive docs and demos are availble on https://objix.dev/#/docs/api.
20
26
21
27
```javascript
22
28
require('objix')
23
-
var o = { a:1 }.map(v=> v +1).log()
29
+
var o = { a:1 }._map(v=> v +1).log()
24
30
```
25
31
26
32
## Getting Started - Browser
@@ -29,7 +35,7 @@ Interactive docs and demos are availble on https://objix.dev/#/docs/api.
0 commit comments