The latest tweets from @QuiverUs. What does quiver mean? To shake with a slight, rapid, tremulous movement. Hip and pocket quivers are popular archery quivers for target shooters. While hip quivers typically are carried on a belt, pocket quivers attach to your pocket. These target quivers allow easy access to your arrows, and are take weight off your bow, which is important in target archery.
Quiver is a set of utility libraries for Dart that makes using many Dartlibraries easier and more convenient, or adds additional functionality.
Documentation #
API Docs are available.
Main Libraries #
Utilities for working with Futures, Streams and async computations.
collect
collects the completion events of an Iterable
of Future
s into aStream
.
enumerate
and concat
represent Stream
versions of the same-namedquiver.iterables methods.
StreamBuffer
allows for the orderly reading of elements from a stream, suchas a socket.
FutureStream
turns a Future<Stream>
into a Stream
which emits the sameevents as the stream returned from the future.
StreamRouter
splits a Stream into multiple streams based on a set ofpredicates.
CountdownTimer
is a simple countdown timer that fires events in regularincrements.
Metronome
is a self-correcting alternative to Timer.periodic
. It providesa simple, tracking periodic stream of DateTime
events with optional anchortime.
stringFromByteStream
constructs a string from a stream of byte lists.
Cache
is a semi-persistent, asynchronously accessed, mapping of keys tovalues. Caches are similar to Maps, except that the cache implementation mightstore values in a remote system, so all operations are asynchronous, and cachesmight have eviction policies.
MapCache
is a Cache implementation backed by a Map.
checkArgument
throws ArgumentError
if the specified argument check expressionis false.
checkListIndex
throws RangeError
if the specified index is out of bounds.
checkState
throws StateError
if the specified state check expression isfalse.
listsEqual
, mapsEqual
and setsEqual
check collections for equality.
indexOf
finds the first index of an item satisfying a predicate.
LruMap
is a map that removes the least recently used item when a thresholdlength is exceeded.
Multimap
is an associative collection that maps keys to collections ofvalues.
BiMap
is a bidirectional map and provides an inverse view, allowinglookup of key by value.
TreeSet
is a balanced binary tree that offers a bidirectional iterator,the ability to iterate from an arbitrary anchor, and 'nearest' search.
Optional
is a way to represent optional values without allowing null
.
Www.quivervision.com
hashObjects
, hash2
, hash3
, and hash4
generate high-quality hashCodes fora list of objects, or 2, 3, or 4 arguments respectively.
concat
, count
, cycle
, enumerate
, merge
, partition
, range
, andzip
create, transform, or combine Iterables in different ways, similar toPython's itertools.
min
, max
, and extent
retrieve the minimum and maximum elements from aniterable.
GeneratingIterable
is an easy way to create lazy iterables that produceelements by calling a function. A common use-case is to traverse properties inan object graph, like the parent relationship in a tree.
InfiniteIterable
is a base class for Iterables that throws on operations thatrequire a finite length.
getTypeName
returns the name of a Type instance.
implements
and classImplements
determine if an instance or ClassMirror,respectively, implement the interface represented by a Type instance. Theyimplement the behavior of is
for mirrors, except for generics.
getMemberMirror
searches though a ClassMirror and its class hierarchy fora member. This makes up for the fact that ClassMirror.members
doesn'tcontain members from interfaces or superclasses.
Method
wraps an InstanceMirror and Symbol to create a callable that invokesa method on the instance. It in effect closurizes a method reflectively.
pattern.dart container utilities for work with Pattern
s and RegExp
s.
Glob
implements glob patterns that are commonly used with filesystem paths.
matchesAny
combines multiple Patterns into one, and allows for exclusions.
matchesFull
returns true if a Pattern matches an entire String.
escapeRegex
escapes special regex characters in a String so that it can beused as a literal match inside of a RegExp.
isBlank
checks if a string is null
, empty or made of whitespace characters.
isNotBlank
checks if a string is not null
, and not blank.
isEmpty
checks if a string is null
or empty.
isNotEmpty
checks if a string is not null
and not empty.
equalsIgnoreCase
checks if two strings are equal, ignoring case.
compareIgnoreCase
compares two strings, ignoring case.
Quiver Scoller
loop
allows you to loop through characters in a string starting and ending atarbitrary indices. Out of bounds indices allow you to wrap around the string,supporting a number of use-cases, including:
- Rotating:
loop('lohel', -3, 2) => 'hello'
- Repeating, like
String
'soperator*
, but with better character-levelcontrol, e.g.:loop('la ', 0, 8) => 'la la la' // no trailing space
- Tailing:
loop('/path/to/some/file.txt', -3) => 'txt'
- Reversing:
loop('top', 3, 0) => 'pot'
Clock
provides points in time relative to the current point in time, forexample: now, 2 days ago, 4 weeks from now, etc. For testability, use Clockrather than other ways of accessing time, like new DateTime()
, so that youcan use a fake time function in your tests to control time.
Now
is a typedef for functions that return the current time in microseconds,since Clock deals in DateTime which only have millisecond accuracy.
aMicrosecond
, aMillisecond
, aSecond
, aMinute
, anHour
, aDay
, andaWeek
are unit duration constants to allow writing for example:
aDay
vs.const Duration(days: 1)
aSecond * 30
vs.const Duration(seconds: 30)
Testing Libraries #
The Quiver testing libraries are intended to be used in testing code, notproduction code. It currently consists of fake implementations of some Quiverinterfaces.
Quiverquant
FakeAsync
enables testing of units which depend upon timers and microtasks.It supports fake advancements of time and the microtask queue, which cause faketimers and microtasks to be processed. A Clock
is provided from which to readthe current fake time. Faking synchronous or blocking time advancement is alsosupported.
Quiver Definition
areEqualityGroups
is a matcher that supports testing operator
andhashCode
implementations.
Quiver Dating
FakeStopwatch
is a Stopwatch that uses a provided now()
function to get thecurrent time.
Comments are closed.