brisky-struct
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -14,3 +14,4 @@ const ms = require('monotonic-timestamp') | ||
exports.inject = [ | ||
require('./functional') | ||
require('./functional'), | ||
require('./iterator') | ||
] | ||
@@ -17,0 +18,0 @@ |
{ | ||
"name": "brisky-struct", | ||
"description": "Data structure build for performance and memory optmization", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "lib/index.js", | ||
@@ -36,3 +36,7 @@ "scripts": { | ||
"devDependencies": { | ||
"immutable": "^3.8.1", | ||
"redux": "^3.6.0", | ||
"vigour-state": "^4.8.2", | ||
"brisky-base": "^4.0.0", | ||
"vigour-observable": "^3.0.0", | ||
"brisky-performance": "^1.4.0", | ||
@@ -49,4 +53,3 @@ "buble": "0.14.0", | ||
"tap-difflet": "0.6.0", | ||
"tape": "4.6.0", | ||
"vigour-observable": "^3.0.0" | ||
"tape": "4.6.0" | ||
}, | ||
@@ -53,0 +56,0 @@ "author": "jim de beer", |
# brisky-struct | ||
An observable data structure | ||
- Deep memmory efficient prototypes | ||
[![Build Status](https://travis-ci.org/vigour-io/brisky-struct.svg?branch=master)](https://travis-ci.org/vigour-io/brisky-struct) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) | ||
[![npm version](https://badge.fury.io/js/brisky-struct.svg)](https://badge.fury.io/js/brisky-struct) | ||
[![Coverage Status](https://coveralls.io/repos/github/vigour-io/brisky-struct/badge.svg?branch=master)](https://coveralls.io/github/vigour-io/brisky-struct?branch=master) | ||
- Deep memory efficient prototypes | ||
- Every value is observable | ||
@@ -11,6 +17,1 @@ - Serializable references | ||
- Low footprint (6kb gzipped) | ||
[![Build Status](https://travis-ci.org/vigour-io/brisky-struct.svg?branch=master)](https://travis-ci.org/vigour-io/brisky-struct) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) | ||
[![npm version](https://badge.fury.io/js/brisky-struct.svg)](https://badge.fury.io/js/brisky-struct) | ||
[![Coverage Status](https://coveralls.io/repos/github/vigour-io/brisky-struct/badge.svg?branch=master)](https://coveralls.io/github/vigour-io/brisky-struct?branch=master) |
const test = require('tape') | ||
const struct = require('../') | ||
test('iterators', t => { | ||
test('iterators - functional', t => { | ||
const a = struct({ key: 1, a: 'a', b: 'b', c: 'c' }) | ||
@@ -29,1 +29,11 @@ t.same(a.keys(), [ 'a', 'b', 'c' ], 'correct initial keys') | ||
}) | ||
test('iterators - for of', t => { | ||
const a = struct([ 1, 2, 3, 4, 5, 6, 7 ]) | ||
const results = [] | ||
for (let val of a) { | ||
results.push(val.compute()) | ||
} | ||
t.same(results, [ 1, 2, 3, 4, 5, 6, 7 ], 'expected iteration') | ||
t.end() | ||
}) |
Sorry, the diff of this file is not supported yet
253309
53
2912
17
17