Skip to content

Commit

Permalink
Merge branch 'release/v1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rousan committed Jan 28, 2018
2 parents ad572c1 + a5c833f commit ed551df
Show file tree
Hide file tree
Showing 4,038 changed files with 161 additions and 373,191 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

package-lock.json
6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- "8"
install:
- npm install
script:
- npm test
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contribution Guidelines

Your PRs and stars are always welcome.

Please, try to follow:

* Clone the repository.
* Checkout `develop` branch.
* Install dependencies.
* Add your new features or fixes.
* Run Promises/A+ test suites.
* Build the project.

```sh
$ git clone https://github.com/rousan/belofte.js.git
$ cd belofte.js
$ git checkout develop
$ npm i
$ npm test
$ npm run build
```
112 changes: 43 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,49 @@
<a href="https://promisesaplus.com/">
<img src="https://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo"
title="Promises/A+ 1.0 compliant" align="right" />
</a>

# Belofte.js

`Belofte.js` is a lightweight Promises/A+ compliant implementation of ECMAScript Promise API.
<h3 align="center">
<br>
<br>
<a href="https://promisesaplus.com/">
<img src="https://promisesaplus.com/assets/logo-small.png" alt="Promises/A+ logo" title="Promises/A+ 1.0 compliant">
</a>
</h1>
<h3 align="center">
BelofteJS
</h3>
<p align="center">
A lightweight Promises/A+ compliant implementation of ECMAScript Promise API
</p>
<br>

[![Build Status](https://travis-ci.org/rousan/belofte.js.svg?branch=develop)](https://travis-ci.org/rousan/belofte.js)
[![NPM version](https://img.shields.io/npm/v/belofte.js.svg)](https://www.npmjs.com/package/belofte.js)
[![NPM total downloads](https://img.shields.io/npm/dt/belofte.js.svg)](https://www.npmjs.com/package/belofte.js)
[![Contributors](https://img.shields.io/github/contributors/rousan/belofte.js.svg)](https://github.com/rousan/belofte.js/graphs/contributors)
[![License](https://img.shields.io/github/license/rousan/belofte.js.svg)](https://github.com/rousan/belofte.js/blob/master/LICENSE)

`BelofteJS` is a lightweight Promises/A+ compliant implementation of ECMAScript Promise API.
Here the `Belofte` is an Afrikaans word, It means `Promise`.

This library is very useful for old browsers or old Javascript engines where
native `Promise` API is not available.

## Install

If you use NPM, run the following command, Otherwise download the latest release from Github.
It uses `UMD` module definition i.e. it supports AMD, CommonJS, and VanillaJS module loader
environments. In VanillaJS, a `Belofte` global object is exported.

`npm install belofte.js`

For NodeJS environment:

```javascript
var Belofte = require("belofte.js");
```
### NPM

For VanillaJS, just insert it into your HTML page:
Install it from `npm`:

```haml
<script src="belofte.min.js"></script>
```bash
$ npm install --save belofte.js
```

## Build

`npm run build`

## Test

`npm test`

## Run Promises/A+ Test Suits
### CDN

`npm run pt`
If you prefer CDN, then just insert it into your HTML page:

## Documentation

* [Getting Started](#getting-started)
* [Classes](#classes)
* [`Belofte.Promise`](#beloftepromise)
* [`Belofte.Deferred`](#beloftedeferred)
* [`Belofte` Global](#belofte-global)
```html
<script src="https://cdn.jsdelivr.net/npm/belofte.js/dist/belofte.min.js"></script>
```

### Getting Started
## Getting Started

```javascript
var Belofte = require("belofte.js");
Expand All @@ -75,7 +67,14 @@ promise.then(function (value) {
});
```

[Here](https://jsfiddle.net/ariyankhan/f9yfwohw/) is the fiddling.
[Here](https://jsfiddle.net/rousan/f9yfwohw/) is the `jsfiddle` link.

## API

* [Classes](#classes)
* [`Belofte.Promise`](#beloftepromise)
* [`Belofte.Deferred`](#beloftedeferred)
* [`Belofte` Global](#belofte-global)

### Classes

Expand Down Expand Up @@ -331,34 +330,9 @@ Where,
* `thisArg` : the `this` value of the `fn` function,

* `arguments`: these are passed to `fn` function as arguments


## Contributors

* [Rousan Ali](https://github.com/ariyankhan)

Contributions are always welcome.

## License

MIT License

Copyright (c) 2017 Rousan Ali

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
## Contributing

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Your PRs and stars are always welcome.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Checkout the [CONTRIBUTING](https://github.com/rousan/belofte.js/blob/master/CONTRIBUTING.md) guides.
11 changes: 5 additions & 6 deletions dist/belofte.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
/*!
* Belofte.js v1.2.0
* Belofte.js v1.3.0
* A lightweight Promises/A+ compliant implementation of ECMAScript Promise API.
* Here the Belofte is an Afrikaans word, It means Promise.
* This library is very useful for old browsers or old Javascript engines where
* native Promise API is not available.
*
* @license Copyright (c) 2017 Rousan Ali, MIT License
* @license Copyright (c) 2017-2018 Rousan Ali, MIT License
*
* Codebase: https://github.com/ariyankhan/belofte.js
* Homepage: https://github.com/ariyankhan/belofte.js#readme
* Date: Fri Jul 28 2017 15:12:17 GMT+0530 (IST)
* Codebase: https://github.com/rousan/belofte.js
* Homepage: https://github.com/rousan/belofte.js#readme
* Date: Sun Jan 28 2018 20:33:24 GMT+0530 (IST)
*/

(function(root, factory) {

"use strict";
Expand Down
2 changes: 1 addition & 1 deletion dist/belofte.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ed551df

Please sign in to comment.