npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

purelogic-ts

v0.1.1

Published

PureLogic for TypeScript

Downloads

19

Readme

purelogic-ts

PureLogic-TS is an embedded DSL for describing map-reduce logic on TypeScript.

npm version Build Status

Bag Types

  • Input
  • One
  • FlatMap
  • DisjointUnion
  • GroupBy. The key is always a string. ES6 Map shouldn't be used because some back-ends may serialize objects.
  • Product

Bag Methods

See iterable-ts, lazy.js, lodash and underscore.

Back-ends

  • Sync Memory
  • Async Memory
  • Event-based in Memory

Data And Data Operation Requirements

  • Serializable. All data should be serializable.
  • Immutable. All data operations (functions) should not change input data.

Serialazable Data

Use TypeScript interfaces instead of classes. The interface should contain properties and no functions.

Serialazible Union Type

interface MyUnion
{
    numberValue: number|undefined;
    stringValue: string|undefined;
}

For Developers

Required

Optional

Getting Started

  • install dependencies npm install.
  • run unit test and coverage npm test.

Cloud9

Run nvm install 6.7.0 && nvm use 6.7.0 in Cloud9 workspace.

Conventions And Rules

  • Don't use class inheritance. Use interfaces and sealed classes.
  • Print margin column (line width) is 100 symbols.
  • Keep object properties immutable, see also https://github.com/Microsoft/TypeScript/pull/6532
  • Keep object properties non-nullable, see also https://github.com/Microsoft/TypeScript/pull/7140

ES6

The project targets "ES6" because TypeScript 2.0 supports async only for "ES6" and above. According to ES6 Compatibility Table, we can use ES6 for

  • Edge 14+ (Windows 10, Windows 10 Mobile, Xbox One),
  • FireFox 48+,
  • Chrome 53+ (including Android 4.2+),
  • Node 6+,
  • Safari 10 (OS X 10.12 Sierra, iOS 10 iPhone 5+).