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

astl

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astl - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

iterator/FrontInsertIterator.ts

2

internal/iterator/disposable/Repeater.ts

@@ -43,3 +43,3 @@ export class Repeater<T>

@inline()
public __non_equals(obj: Repeater<T>): boolean
protected __non_equals(obj: Repeater<T>): boolean
{

@@ -46,0 +46,0 @@ return !this.equals(obj);

@@ -18,2 +18,3 @@ import { IPushBack } from "../internal/container/partial/IPushBack";

@inline()
public set value(val: T)

@@ -33,3 +34,3 @@ {

@operator("!=")
public __non_equals(obj: BackInsertIterator<Container, T>): boolean
protected __non_equals(obj: BackInsertIterator<Container, T>): boolean
{

@@ -36,0 +37,0 @@ return this.equals(obj) === false;

import { IPushBack } from "../internal/container/partial/IPushBack";
import { IPushFront } from "../internal/container/partial/IPushFront";
import { BackInsertIterator } from "./BackInsertIterator";
import { FrontInsertIterator } from "./FrontInsertIterator";
import { InsertIterator } from "./InsertIterator";
/* ---------------------------------------------------------
ITERATORS
--------------------------------------------------------- */
@inline()
export function begin<Container, Iterator>
(container: Container): Iterator
{
return container.begin();
}
@inline()
export function end<Container, Iterator>
(container: Container): Iterator
{
return container.end();
}
@inline()
export function rbegin<Container, ReverseIterator>
(container: Container): ReverseIterator
{
container.rbegin();
}
@inline()
export function rend<Container, ReverseIterator>
(container: Container): ReverseIterator
{
container.rend();
}
@inline()
export function make_reverse_iterator<IteratorT, ReverseT>
(it: IteratorT): ReverseT
{
return it.reverse();
}
/* ---------------------------------------------------------
INSERTERS
--------------------------------------------------------- */
@inline()
export function inserter<ContainerT, IteratorT, T>
(container: ContainerT, it: IteratorT): InsertIterator<ContainerT, IteratorT, T>
{
return new InsertIterator(container, it);
}
@inline()
export function front_inserter<Source extends IPushFront<T>, T>
(source: Source): FrontInsertIterator<Source, T>
{
return new FrontInsertIterator(source);
}
@inline()
export function back_inserter<Source extends IPushBack<T>, T>

@@ -5,0 +65,0 @@ (source: Source): BackInsertIterator<Source, T>

@@ -1,9 +0,25 @@

export function advance<InputIterator>
(it: InputIterator, n: isize): InputIterator
import { IEmpty } from "../internal/container/partial/IEmpty";
import { ISize } from "../internal/container/partial/ISize";
/* =========================================================
GLOBAL FUNCTIONS
- ACCESSORS
- MOVERS
- FACTORIES
============================================================
ACCESSORS
--------------------------------------------------------- */
@inline()
export function empty(source: IEmpty): boolean
{
while (n-- > 0)
it = it.next();
return it;
return source.empty();
}
@inline()
export function size(source: ISize): usize
{
return source.size();
}
// @todo: specified implementation for the random-access-iterator
export function distance<IteratorT>

@@ -16,2 +32,32 @@ (first: IteratorT, last: IteratorT): isize

return ret;
}
/* ---------------------------------------------------------
ACCESSORS
--------------------------------------------------------- */
// @todo: specified implementation for the random-access-iterator
export function advance<InputIterator>
(it: InputIterator, n: isize): InputIterator
{
while (n-- > 0)
it = it.next();
return it;
}
export function prev<BidirectionalIterator>
(it: BidirectionalIterator, n: usize = 1): BidirectionalIterator
{
if (n === 1)
return it.prev();
else
return advance(it, -<isize>n);
}
export function next<ForwardIterator>
(it: ForwardIterator, n: usize = 1): ForwardIterator
{
if (n === 1)
return it.next();
else
return advance(it, n);
}

@@ -8,4 +8,6 @@ export * from "./IBidirectionalIterator";

export * from "./BackInsertIterator";
export * from "./FrontInsertIterator";
export * from "./InsertIterator";
export * from "./factory";
export * from "./global";

@@ -9,3 +9,3 @@ {

},
"version": "0.0.5",
"version": "0.0.6",
"main": "./index.ts",

@@ -12,0 +12,0 @@ "scripts": {

@@ -53,3 +53,3 @@ # AssemblyScript Standard Template Library

`<algorithm>`
- binary_searche
- binary_search
- heap

@@ -73,5 +73,2 @@ - iterations

- `<utility>`
- `<numeric>`
- *operations*
- *special_math*

@@ -78,0 +75,0 @@

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