Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ancient-oak

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ancient-oak - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

dist/ancient-oak-0.3.5.js

4

bower.json
{
"name": "ancient-oak",
"version": "0.3.4",
"main": "dist/ancient-oak-0.3.4.js",
"version": "0.3.5",
"main": "dist/ancient-oak-0.3.5.js",
"ignore": [

@@ -6,0 +6,0 @@ "spec",

{
"name": "ancient-oak",
"repository": "brainshave/ancient-oak",
"version": "0.3.4",
"version": "0.3.5",
"scripts": [

@@ -6,0 +6,0 @@ "lib/**/*.js"

@@ -25,2 +25,8 @@ # Feature ideas

to have empty space in left-most leaf, the maximum start offset is
only 31 (because leaf size is 32).
only 31 (because leaf size is 32).
## I.parse
Use Ancient Oak as JSON.parse reviver.
vide: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse

@@ -92,2 +92,3 @@ "use strict";

get.map = map;
get.nmap = nmap;
get.filter = filter;

@@ -242,2 +243,9 @@

function nmap (fn) {
return reduce(function (result, value, key) {
result[key] = fn(value, key, get);
return result;
}, new_dump());
}
function reduce (fn, init) {

@@ -244,0 +252,0 @@ var result = init;

@@ -11,3 +11,3 @@ {

],
"version": "0.3.4",
"version": "0.3.5",
"scripts": {

@@ -14,0 +14,0 @@ "dist": "scripts/dist",

@@ -59,3 +59,3 @@ # Ancient Oak: The Immutable Tree

As with regular objects in JavaScript, keys are not guarantied to
As with regular objects in JavaScript, keys are not guaranteed to
be sorted.

@@ -145,3 +145,3 @@

=> I({a: 1}).update(function (v) { return v + 1 })
=> I({a: 1}).update('a', function (v) { return v + 1 })
<= I({a: 2})

@@ -188,2 +188,6 @@

### `.nmap(fn(value,key))`
Same as `map` but returns native object/array.
### `.filter(fn(value, key))`

@@ -241,2 +245,2 @@

MIT, see [COPYING](COPYING).
MIT, see [COPYING](COPYING).

@@ -136,2 +136,22 @@ "use strict";

});
describe(".nmap", function () {
it("maps to native array", function () {
var result = store([1, 2, 3]).nmap(function (x) {
return x * 2;
});
expect(result instanceof Array).toBe(true, 'result instanceof Array');
expect(result).toEqual([2, 4, 6]);
});
it("maps to native object", function () {
var result = store({a: 1, b: 2, c: 3}).nmap(function (x) {
return x * 2;
});
expect(result instanceof Array).toBe(false, 'result instanceof Array');
expect(result).toEqual({a: 2, b: 4, c: 6});
});
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc