Giter Club home page Giter Club logo

funland.js's Introduction

Funland

Warning

This repository has been unmaintained and is now ARCHIVED.

Funland is a specification of common algebraic structures for JavaScript, TypeScript and Flow, based on Fantasy Land and compatible with static-land.

Usage

For the TypeScript / Flow types, which are very light (no accompanying JavaScript code, just types):

npm install --save funland

For the laws:

npm install --save funland-laws

Usage of laws mostly makes sense in tests, being built for property-based testing, so usage of jsverify is recommended, but not required.

Documentation

API docs:

Exposed type classes:

Testing the Included Type-class Laws

The included laws are meant for usage with property-based testing, so you'll need something like jsverify as a dependency.

npm install funland-laws --save-dev

npm install jsverify --save-dev

# For jsverify types (for TypeScript):
npm install @types/jsverify --save-dev

And then you can do something like this:

import * as jv from "jsverify"
import { Setoid } from "funland"
import { Equiv, SetoidLaws } from "funland-laws"

export function setoidCheck<A>(
  genA: jv.Arbitrary<A>,
  F: Setoid<A>,
  lawsRef?: SetoidLaws<A>) {

  const laws = lawsRef || new SetoidLaws<A>(F)
  const eq = (p: Equiv<boolean>) => p.lh === p.rh

  jv.property("setoid.reflexivity", genA,
    x => eq(laws.reflexivity(x)))

  jv.property("setoid.symmetry", genA, genA,
    (x, y) => eq(laws.symmetry(x, y)))

  jv.property("setoid.transitivity", genA, genA, genA,
    (x, y, z) => eq(laws.transitivity(x, y, z)))
}

Such integration is currently not provided by Funland, however the project's repository has code to use for inspiration, see github.com/.../funland-laws/test-common.

Modules: UMD and ES 2015

The library has been compiled using UMD (Universal Module Definition), so it should work with CommonJS and AMD, for standalone usage in browsers or Node.js.

But it also provides a module definition in package.json, thus providing compatibility with ECMAScript 2015 modules, for usage when used with a modern JS engine, or when bundling with a tool chain that understands ES2015 modules, like Rollup or Webpack.

TypeScript or Flow?

Funland exposes both TypeScript and Flow type annotations out of the box.

Contributing

The Funland project welcomes contributions from anybody wishing to participate. All code or documentation that is provided must be licensed with the same license that Funland is licensed with (MIT).

Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about the code. Pull requests are also gladly accepted. For more information, check out the contributor guide.

License

All code in this repository is licensed under the MIT license.
See LICENCE.

funland.js's People

Contributors

alexandru avatar goodmind avatar dwhitney avatar greenkeeper[bot] avatar

Stargazers

monkeytao avatar Bryden Wayne avatar ebigram avatar Patrick Roza avatar Raoul avatar Kevin L avatar Rajiv Bose avatar BeA avatar Theofanis Despoudis avatar ik5 avatar Ray Yee avatar Henry S avatar Jeremy W. Sherman avatar Mathieu M-Gosselin avatar --- avatar Jesus Franco avatar  avatar Aman Kubanychbek avatar Tim Kersey avatar Josh Burgess avatar Andrejs Agejevs avatar Abraham White avatar Iaroslav Voloshchuk avatar Nathan Sculli avatar cybai (Haku) avatar David Chase avatar Dmitri Zaitsev avatar Victor Pagani avatar Barry Buck avatar  avatar Piotr Monwid-Olechnowicz avatar  avatar ⊣˚∆˚⊢ avatar Thor Amorim avatar Dmitry avatar Wayne Maurer avatar  avatar Lewis Zhang avatar lin onetwo avatar abdul dakkak avatar Randall Leeds avatar  avatar Josh Miller avatar  avatar Giulio Canti avatar Robert Butacu avatar  avatar

Watchers

 avatar Stéphane Le Dorze avatar James Cloos avatar Iaroslav Voloshchuk avatar Giovanni Gonzaga avatar  avatar

funland.js's Issues

An in-range update of rimraf is breaking the build 🚨

The devDependency rimraf was updated from 2.6.2 to 2.6.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

rimraf is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 6 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add Semigroup

I'd like to add Semigroup Monoid and Group, but I'm going to do a trial run with just Semigroup to make sure you like my PR. I'll submit it shortly and begin work on Monoid and Group

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of jsverify is breaking the build 🚨

The devDependency jsverify was updated from 0.8.3 to 0.8.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

jsverify is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 25 commits.

  • 48ba3e5 Release 0.8.4
  • 5d40ead Merge pull request #277 from jsverify/updates-2018-10-31
  • 85384bf Disable node 6 on travis
  • b8338f4 grammar fix in arbitrary.smap documentation
  • 5325c1d Duplicate i.e. i.e.
  • f2a35e9 Update .travis.yml
  • 005f113 Update 2018-10-31
  • 28be14f Merge pull request #270 from SydneyUniLibrary-Jim/issue-242
  • 261b45d Fixed TypeScript bindings for either.
  • b1f63f5 Merge pull request #267 from jsverify/travis-node-ver
  • f99de9a Adjust node versions
  • e018582 Update ts-node
  • 0d392dd Merge pull request #247 from xtianjohns/jasmine-helpers
  • 6f96085 Generate readme
  • 6e0b0ba Remove outdated Jasmine reference in readme

There are 25 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/lodash is breaking the build 🚨

The devDependency @types/lodash was updated from 4.14.117 to 4.14.118.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@types/lodash is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of babel7 is breaking the build 🚨

There have been updates to the babel7 monorepo:

    • The devDependency @babel/core was updated from 7.3.3 to 7.3.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

This monorepo update includes releases of one or more dependencies which all belong to the babel7 group definition.

babel7 is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of tsc-watch is breaking the build 🚨

The devDependency tsc-watch was updated from 1.0.27 to 1.0.28.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

tsc-watch is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

  • ae2f5a8 version 1.0.28
  • 271cb8c command execution args extraction changed to 'string-argv'

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.

Since we didn’t receive a CI status on the greenkeeper/initial branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/.

Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.