new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import assertString from './util/assertString';
|
||||
/*
|
||||
Checks if the provided string matches to a correct Media type format (MIME type)
|
||||
|
||||
This function only checks is the string format follows the
|
||||
etablished rules by the according RFC specifications.
|
||||
This function supports 'charset' in textual media types
|
||||
(https://tools.ietf.org/html/rfc6657).
|
||||
|
||||
This function does not check against all the media types listed
|
||||
by the IANA (https://www.iana.org/assignments/media-types/media-types.xhtml)
|
||||
because of lightness purposes : it would require to include
|
||||
all these MIME types in this librairy, which would weigh it
|
||||
significantly. This kind of effort maybe is not worth for the use that
|
||||
this function has in this entire librairy.
|
||||
|
||||
More informations in the RFC specifications :
|
||||
- https://tools.ietf.org/html/rfc2045
|
||||
- https://tools.ietf.org/html/rfc2046
|
||||
- https://tools.ietf.org/html/rfc7231#section-3.1.1.1
|
||||
- https://tools.ietf.org/html/rfc7231#section-3.1.1.5
|
||||
*/
|
||||
// Match simple MIME types
|
||||
// NB :
|
||||
// Subtype length must not exceed 100 characters.
|
||||
// This rule does not comply to the RFC specs (what is the max length ?).
|
||||
|
||||
var mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+]{1,100}$/i; // eslint-disable-line max-len
|
||||
// Handle "charset" in "text/*"
|
||||
|
||||
var mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len
|
||||
// Handle "boundary" in "multipart/*"
|
||||
|
||||
var mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len
|
||||
|
||||
export default function isMimeType(str) {
|
||||
assertString(str);
|
||||
return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"rxSubscriber.js","sources":["../../../src/internal/symbol/rxSubscriber.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,CAChC,OAAO,MAAM,KAAK,UAAU;IAC1B,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC;IACxB,CAAC,CAAC,iBAAiB,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;AAK3C,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAC"}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"onErrorResumeNext.js","sources":["../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwEhC,MAAM,UAAU,iBAAiB;IAAO,iBAEqD;SAFrD,UAEqD,EAFrD,qBAEqD,EAFrD,IAEqD;QAFrD,4BAEqD;;IAE3F,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAO,KAAK,CAAC;KACd;IAEO,IAAA,kBAAK,EAAE,4BAAY,CAAa;IAExC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;QAC1C,OAAO,iBAAiB,eAAI,KAAK,EAAE;KACpC;IAED,OAAO,IAAI,UAAU,CAAC,UAAA,UAAU;QAC9B,IAAM,OAAO,GAAG,cAAM,OAAA,UAAU,CAAC,GAAG,CAClC,iBAAiB,eAAI,SAAS,EAAE,SAAS,CAAC,UAAU,CAAC,CACtD,EAFqB,CAErB,CAAC;QAEF,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;YAC3B,IAAI,YAAC,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvC,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isUUID;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var uuid = {
|
||||
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
|
||||
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
||||
5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
|
||||
all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
|
||||
};
|
||||
|
||||
function isUUID(str) {
|
||||
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';
|
||||
(0, _assertString.default)(str);
|
||||
var pattern = uuid[version];
|
||||
return pattern && pattern.test(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("rxjs-compat/add/operator/windowTime");
|
||||
//# sourceMappingURL=windowTime.js.map
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"name": "auto-changelog",
|
||||
"version": "2.2.1",
|
||||
"description": "Command line tool for generating a changelog from git tags and commit history",
|
||||
"main": "./src/index.js",
|
||||
"bin": {
|
||||
"auto-changelog": "./src/index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.3"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "standard --verbose | snazzy",
|
||||
"lint-fix": "standard --fix",
|
||||
"lint-markdown": "markdownlint README.md test/data/*.md",
|
||||
"test": "cross-env NODE_ENV=test mocha -r @babel/register test",
|
||||
"test-coverage": "cross-env NODE_ENV=test nyc mocha test",
|
||||
"report-coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json",
|
||||
"preversion": "npm run lint && npm run test",
|
||||
"version": "node src/index.js --package && git add CHANGELOG.md",
|
||||
"generate-test-data": "cross-env NODE_ENV=test node scripts/generate-test-data.js"
|
||||
},
|
||||
"author": "Pete Cook <pete@cookpete.com> (https://github.com/cookpete)",
|
||||
"homepage": "https://github.com/CookPete/auto-changelog",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/CookPete/auto-changelog.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/CookPete/auto-changelog/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"auto",
|
||||
"automatic",
|
||||
"changelog",
|
||||
"change",
|
||||
"log",
|
||||
"generator",
|
||||
"git",
|
||||
"commit",
|
||||
"commits",
|
||||
"history"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^5.0.0",
|
||||
"handlebars": "^4.7.3",
|
||||
"lodash.uniqby": "^4.7.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"parse-github-url": "^1.0.2",
|
||||
"semver": "^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/register": "^7.9.0",
|
||||
"babel-plugin-istanbul": "^6.0.0",
|
||||
"babel-plugin-rewire": "^1.2.0",
|
||||
"chai": "^4.2.0",
|
||||
"codecov": "^3.6.5",
|
||||
"cross-env": "^7.0.2",
|
||||
"markdownlint-cli": "^0.22.0",
|
||||
"mocha": "^7.1.1",
|
||||
"nyc": "^15.0.0",
|
||||
"snazzy": "^8.0.0",
|
||||
"standard": "^14.3.3"
|
||||
},
|
||||
"babel": {
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
"istanbul",
|
||||
"rewire"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"test/data/"
|
||||
]
|
||||
},
|
||||
"nyc": {
|
||||
"all": true,
|
||||
"include": "src",
|
||||
"exclude": "src/index.js",
|
||||
"sourceMap": false,
|
||||
"instrument": false,
|
||||
"report-dir": "./coverage",
|
||||
"temp-dir": "./coverage/.nyc_output",
|
||||
"require": [
|
||||
"@babel/register"
|
||||
],
|
||||
"reporter": [
|
||||
"text",
|
||||
"html"
|
||||
]
|
||||
},
|
||||
"auto-changelog": {
|
||||
"breakingPattern": "Breaking change"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { mergeMap } from './mergeMap';
|
||||
export function mergeMapTo(innerObservable, resultSelector, concurrent = Number.POSITIVE_INFINITY) {
|
||||
if (typeof resultSelector === 'function') {
|
||||
return mergeMap(() => innerObservable, resultSelector, concurrent);
|
||||
}
|
||||
if (typeof resultSelector === 'number') {
|
||||
concurrent = resultSelector;
|
||||
}
|
||||
return mergeMap(() => innerObservable, concurrent);
|
||||
}
|
||||
//# sourceMappingURL=mergeMapTo.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/util/subscribeToObservable"));
|
||||
//# sourceMappingURL=subscribeToObservable.js.map
|
||||
@@ -0,0 +1,36 @@
|
||||
/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';
|
||||
export function buffer(closingNotifier) {
|
||||
return function bufferOperatorFunction(source) {
|
||||
return source.lift(new BufferOperator(closingNotifier));
|
||||
};
|
||||
}
|
||||
var BufferOperator = /*@__PURE__*/ (function () {
|
||||
function BufferOperator(closingNotifier) {
|
||||
this.closingNotifier = closingNotifier;
|
||||
}
|
||||
BufferOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
|
||||
};
|
||||
return BufferOperator;
|
||||
}());
|
||||
var BufferSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(BufferSubscriber, _super);
|
||||
function BufferSubscriber(destination, closingNotifier) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.buffer = [];
|
||||
_this.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(_this)));
|
||||
return _this;
|
||||
}
|
||||
BufferSubscriber.prototype._next = function (value) {
|
||||
this.buffer.push(value);
|
||||
};
|
||||
BufferSubscriber.prototype.notifyNext = function () {
|
||||
var buffer = this.buffer;
|
||||
this.buffer = [];
|
||||
this.destination.next(buffer);
|
||||
};
|
||||
return BufferSubscriber;
|
||||
}(SimpleOuterSubscriber));
|
||||
//# sourceMappingURL=buffer.js.map
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operator/bufferTime"));
|
||||
//# sourceMappingURL=bufferTime.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"G A B","2":"J E F BC"},B:{"1":"C K L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","16":"CC tB DC EC"},D:{"1":"6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","16":"I u J E F G A B C K L","132":"0 1 2 3 4 5 H M N O v w x y z"},E:{"1":"A B C K L H 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","16":"I u J GC zB","132":"E F G IC JC KC","260":"HC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d SC rB","16":"G B OC PC QC RC qB 9B","132":"H M"},G:{"1":"aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","16":"zB","132":"F TC AC UC VC WC XC YC ZC"},H:{"1":"nC"},I:{"1":"D sC tC","16":"oC pC","132":"tB I qC rC AC"},J:{"132":"E A"},K:{"1":"C e rB","16":"A B qB 9B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"Node.compareDocumentPosition()"};
|
||||
@@ -0,0 +1,157 @@
|
||||
# About this CHANGELOG
|
||||
|
||||
This file will include all API breakage, new features, and upgrade info in
|
||||
localForage's lifetime.
|
||||
|
||||
### [1.9.0](https://github.com/mozilla/localForage/releases/tag/1.9.0)
|
||||
|
||||
* Fixed TypeScript definition for `getItem`. It now notes that `getItem` can return `null`, so this change may cause TypeScript code that didn't account for `null` values to fail. See #980.
|
||||
|
||||
### [1.8.1](https://github.com/mozilla/localForage/releases/tag/1.8.1)
|
||||
|
||||
* Reverted the ESM/`module` field change in #940, which broke many builds. See: #979. Sorry about that! 😓
|
||||
|
||||
### [1.8.0](https://github.com/mozilla/localForage/releases/tag/1.8.0)
|
||||
|
||||
* No changes to code, but added a `module` field in `package.json` for better ESM support. See: #940.
|
||||
|
||||
### [1.7.4](https://github.com/mozilla/localForage/releases/tag/1.7.4)
|
||||
|
||||
* Use `openKeyCursor` instead of `openCursor` for `key()` retrieval. Props to @MeMark2 for the fix, and thanks to @lincolnthree and @f for additional testing!
|
||||
|
||||
### [1.7.3](https://github.com/mozilla/localForage/releases/tag/1.7.3)
|
||||
|
||||
* Add `.npmignore` file to reduce package size when installed via npm.
|
||||
|
||||
### [1.6](https://github.com/mozilla/localForage/releases/tag/1.6.0)
|
||||
|
||||
* Add `dropInstance()` method to localforage.
|
||||
* Improve IDB driver reliability when a connection gets closed.
|
||||
|
||||
### [1.5.7]
|
||||
|
||||
* Fix IE8 localStorage support detection.
|
||||
|
||||
### [1.5.6]
|
||||
|
||||
* Upgrade lie to 3.1.1 to work with yarn.
|
||||
|
||||
### [1.5.5]
|
||||
|
||||
* Roll back dropInstance breaking change.
|
||||
|
||||
### [1.5.4]
|
||||
|
||||
* Set `null` as `undefined` (for Edge).
|
||||
|
||||
### [1.5.3]
|
||||
|
||||
* Check whether localStorage is actually usable.
|
||||
|
||||
### [1.5.2]
|
||||
|
||||
* Prevent some unnecessary logs when calling `createInstance()`.
|
||||
|
||||
### [1.5.1]
|
||||
|
||||
* Try to re-establish IDB connection after an InvalidStateError.
|
||||
* Added Generics to `iterate()` TS Typings.
|
||||
* Define custom drivers syncronously when `_support` isn't a function.
|
||||
* Use the custom driver API for internal drivers, which makes possible to override parts of their implementation.
|
||||
|
||||
### [1.5](https://github.com/mozilla/localForage/releases/tag/1.5.0)
|
||||
* **Major storage engine change for Safari**: We now use IndexedDB as the storage engine for Safari v10.1 (and above). This means that **pre-existing Safari** `>= 10.1` users will experience "data loss" **after upgrading your site from a previous version of localForage to v1.5**. In fact no data is lost but the engine will change so localForage will seem empty.
|
||||
* You can use the [localForage 1.4 compatibility plugin](https://github.com/localForage/localForage-compatibility-1-4) after the upgrade so that all your Safari users (both old & new) continue to use the WebSQL driver.
|
||||
* Alternativelly you can force a connection to WebSQL using [localForage's config](https://localforage.github.io/localForage/#settings-api-setdriver) to either keep using your existing WebSQL database or migrate to IndexedDB.
|
||||
|
||||
### [1.4.2](https://github.com/mozilla/localForage/releases/tag/1.4.2)
|
||||
* Fixes #562.
|
||||
|
||||
### [1.4.1](https://github.com/mozilla/localForage/releases/tag/1.4.1)
|
||||
* Fixes #520; browserify builds work properly
|
||||
|
||||
### [1.4](https://github.com/mozilla/localForage/releases/tag/1.4.0)
|
||||
* Fixes #516; this version should always load the correct driver without that bug.
|
||||
|
||||
### [1.3](https://github.com/mozilla/localForage/releases/tag/1.3.0)
|
||||
* We now use ES6 for our source code and `webpack` to bundle the `dist/` files.
|
||||
|
||||
### [1.2](https://github.com/mozilla/localForage/releases/tag/1.2.0)
|
||||
* Iterate through the entire database using `iterate()`. ([#283](https://github.com/mozilla/localForage/pull/283); fixes [#186](https://github.com/mozilla/localForage/pull/186))
|
||||
|
||||
### [1.1](https://github.com/mozilla/localForage/releases/tag/1.1.0)
|
||||
* Custom drivers can be created using `defineDriver()`. ([#282](https://github.com/mozilla/localForage/pull/282); fixes [#267](https://github.com/mozilla/localForage/pull/267))
|
||||
|
||||
### [1.0.3](https://github.com/mozilla/localForage/releases/tag/1.0.3)
|
||||
* `config()` accepts a new option: `driver`, so users can set the driver during config rather than using `setDriver()`. ([#273](https://github.com/mozilla/localForage/pull/273); fixes [#168](https://github.com/mozilla/localForage/pull/168))
|
||||
|
||||
### [1.0](https://github.com/mozilla/localForage/releases/tag/1.0.0)
|
||||
|
||||
* It is no longer necessary to queue commands using `ready()` when using RequireJS. ([723cc94e06](https://github.com/mozilla/localForage/commit/723cc94e06af4f5ba4c53fa65524ccd5f6c4432e))
|
||||
* `setDriver` now accepts an array of drivers to be used, in order of preference, instead of simply a string. The string option is still supported. (eg. now one can use `setDriver(['WebSQL', 'localStorage'])` instead of `setDriver('WebSQL')`)
|
||||
* node-style, error-first argument method signatures are used for callbacks. Promises don't use error-first method signatures; instead they supply an error to the promise's `reject()` function.
|
||||
|
||||
### [0.9](https://github.com/mozilla/localForage/releases/tag/0.9.1)
|
||||
|
||||
This release drops support for some legacy browsers, though not actually the
|
||||
ones you might think. localForage's new policy is to support the current
|
||||
version of all major browsers plus up to three versions back.
|
||||
|
||||
* Add built versions without the Promises polyfill to `dist/` directory. ([#172](https://github.com/mozilla/localForage/pull/172))
|
||||
* **Drop support for Firefox 3.5. Minimum version is now Firefox 25.** (Technically, Firefox 4+ seems to work.)
|
||||
* **Drop support for Chrome 31 and below. Minimum version is now Chrome 32.**
|
||||
* Fix a **lot** of bugs. Especially in Internet Exploder.
|
||||
* Switch to Mocha tests and test on [Sauce Labs](https://saucelabs.com/).
|
||||
* Add a `keys()` method. ([#180](https://github.com/mozilla/localForage/pull/180))
|
||||
* Check for localStorage instead of assuming it's available. ([#183](https://github.com/mozilla/localForage/pull/183))
|
||||
|
||||
### [Version 0.8](https://github.com/mozilla/localForage/releases/tag/0.8.1)
|
||||
|
||||
* Add support for web workers. ([#144](https://github.com/mozilla/localForage/pull/144), [#147](https://github.com/mozilla/localForage/pull/147)).
|
||||
|
||||
### [Version 0.6.1](https://github.com/mozilla/localForage/releases/tag/0.6.1)
|
||||
|
||||
* Put built versions back in `dist/` directory.
|
||||
|
||||
### [Version 0.6.0](https://github.com/mozilla/localForage/releases/tag/0.6.0)
|
||||
|
||||
* Add `localforage.config`. ([#40](https://github.com/mozilla/localForage/pull/140))
|
||||
* Fix iFrame bug in WebKit. ([#78](https://github.com/mozilla/localForage/issues/78))
|
||||
* Improve error handling. ([#60](https://github.com/mozilla/localForage/issues/60))
|
||||
* Remove support for `window.localForageConfig`. ([#135](https://github.com/mozilla/localForage/issues/135))
|
||||
|
||||
### [Version 0.4](https://github.com/mozilla/localForage/releases/tag/0.4.0)
|
||||
|
||||
* Built versions of localForage are now in the top-level directory. ([2d11c90](https://github.com/mozilla/localForage/commit/2d11c90))
|
||||
|
||||
### [Version 0.3](https://github.com/mozilla/localForage/releases/tag/0.3.0)
|
||||
|
||||
* Check code quality in test suite ([#124](https://github.com/mozilla/localForage/pull/124))
|
||||
* `_initDriver()` is called after first public API call ([#119](https://github.com/mozilla/localForage/pull/119))
|
||||
|
||||
### [Version 0.2.1](https://github.com/mozilla/localForage/releases/tag/0.2.1)
|
||||
|
||||
* Allow configuration of WebSQL DB size ([commit](https://github.com/mozilla/localForage/commit/6e78fff51a23e729206a03e5b750e959d8610f8c))
|
||||
* Use bower for JS dependencies instead of `vendor/` folder ([#109](https://github.com/mozilla/localForage/pull/109))
|
||||
|
||||
### [Version 0.2.0](https://github.com/mozilla/localForage/releases/tag/0.2.0)
|
||||
|
||||
* Add support for ArrayBuffer, Blob, and TypedArrays ([#54](https://github.com/mozilla/localForage/pull/54), [#73](https://github.com/mozilla/localForage/pull/73))
|
||||
|
||||
### [Version 0.1.1](https://github.com/mozilla/localForage/releases/tag/0.1.1)
|
||||
|
||||
* Added config options to allow users to set their own database names, etc. ([#100](https://github.com/mozilla/localForage/pull/100))
|
||||
|
||||
---
|
||||
|
||||
### March 16th, 2014
|
||||
|
||||
* Moved Backbone adapter to its own repository ([b7987b3091855379d4908376b668b4b51a6fedfe](https://github.com/mozilla/localForage/commit/b7987b3091855379d4908376b668b4b51a6fedfe))
|
||||
|
||||
### March 13th, 2014
|
||||
|
||||
* Changed `localforage.driver` to a function instead of the string directly ([49415145021b0029d2521182de6e338e048fe5b1](https://github.com/mozilla/localForage/commit/49415145021b0029d2521182de6e338e048fe5b1))
|
||||
|
||||
### March 4th, 2014
|
||||
|
||||
* Changed the IndexedDB database name from `asyncStorage` to `localforage` ([f4e0156a29969a79005ac27b303d7e321a720fc6](https://github.com/mozilla/localForage/commit/f4e0156a29969a79005ac27b303d7e321a720fc6))
|
||||
@@ -0,0 +1,5 @@
|
||||
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
||||
export function isPromise(value) {
|
||||
return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
|
||||
}
|
||||
//# sourceMappingURL=isPromise.js.map
|
||||
@@ -0,0 +1,54 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function distinctUntilChanged(compare, keySelector) {
|
||||
return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));
|
||||
}
|
||||
class DistinctUntilChangedOperator {
|
||||
constructor(compare, keySelector) {
|
||||
this.compare = compare;
|
||||
this.keySelector = keySelector;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
|
||||
}
|
||||
}
|
||||
class DistinctUntilChangedSubscriber extends Subscriber {
|
||||
constructor(destination, compare, keySelector) {
|
||||
super(destination);
|
||||
this.keySelector = keySelector;
|
||||
this.hasKey = false;
|
||||
if (typeof compare === 'function') {
|
||||
this.compare = compare;
|
||||
}
|
||||
}
|
||||
compare(x, y) {
|
||||
return x === y;
|
||||
}
|
||||
_next(value) {
|
||||
let key;
|
||||
try {
|
||||
const { keySelector } = this;
|
||||
key = keySelector ? keySelector(value) : value;
|
||||
}
|
||||
catch (err) {
|
||||
return this.destination.error(err);
|
||||
}
|
||||
let result = false;
|
||||
if (this.hasKey) {
|
||||
try {
|
||||
const { compare } = this;
|
||||
result = compare(this.key, key);
|
||||
}
|
||||
catch (err) {
|
||||
return this.destination.error(err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.hasKey = true;
|
||||
}
|
||||
if (!result) {
|
||||
this.key = key;
|
||||
this.destination.next(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=distinctUntilChanged.js.map
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operator/merge';
|
||||
@@ -0,0 +1,205 @@
|
||||
/* see http://davidnewton.ca/the-current-state-of-hyphenation-on-the-web
|
||||
http://davidnewton.ca/demos/hyphenation/test.html
|
||||
|
||||
|
||||
There are three tests:
|
||||
1. csshyphens - tests hyphens:auto actually adds hyphens to text
|
||||
2. softhyphens - tests that ­ does its job
|
||||
3. softhyphensfind - tests that in-browser Find functionality still works correctly with ­
|
||||
|
||||
These tests currently require document.body to be present
|
||||
|
||||
Hyphenation is language specific, sometimes.
|
||||
See for more details: http://code.google.com/p/hyphenator/source/diff?spec=svn975&r=975&format=side&path=/trunk/Hyphenator.js#sc_svn975_313
|
||||
|
||||
If loading Hyphenator.js via Modernizr.load, be cautious of issue 158: http://code.google.com/p/hyphenator/issues/detail?id=158
|
||||
|
||||
More details at https://github.com/Modernizr/Modernizr/issues/312
|
||||
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
||||
if (!document.body){
|
||||
window.console && console.warn('document.body doesn\'t exist. Modernizr hyphens test needs it.');
|
||||
return;
|
||||
}
|
||||
|
||||
// functional test of adding hyphens:auto
|
||||
function test_hyphens_css() {
|
||||
try {
|
||||
/* create a div container and a span within that
|
||||
* these have to be appended to document.body, otherwise some browsers can give false negative */
|
||||
var div = document.createElement('div'),
|
||||
span = document.createElement('span'),
|
||||
divStyle = div.style,
|
||||
spanHeight = 0,
|
||||
spanWidth = 0,
|
||||
result = false,
|
||||
firstChild = document.body.firstElementChild || document.body.firstChild;
|
||||
|
||||
div.appendChild(span);
|
||||
span.innerHTML = 'Bacon ipsum dolor sit amet jerky velit in culpa hamburger et. Laborum dolor proident, enim dolore duis commodo et strip steak. Salami anim et, veniam consectetur dolore qui tenderloin jowl velit sirloin. Et ad culpa, fatback cillum jowl ball tip ham hock nulla short ribs pariatur aute. Pig pancetta ham bresaola, ut boudin nostrud commodo flank esse cow tongue culpa. Pork belly bresaola enim pig, ea consectetur nisi. Fugiat officia turkey, ea cow jowl pariatur ullamco proident do laborum velit sausage. Magna biltong sint tri-tip commodo sed bacon, esse proident aliquip. Ullamco ham sint fugiat, velit in enim sed mollit nulla cow ut adipisicing nostrud consectetur. Proident dolore beef ribs, laborum nostrud meatball ea laboris rump cupidatat labore culpa. Shankle minim beef, velit sint cupidatat fugiat tenderloin pig et ball tip. Ut cow fatback salami, bacon ball tip et in shank strip steak bresaola. In ut pork belly sed mollit tri-tip magna culpa veniam, short ribs qui in andouille ham consequat. Dolore bacon t-bone, velit short ribs enim strip steak nulla. Voluptate labore ut, biltong swine irure jerky. Cupidatat excepteur aliquip salami dolore. Ball tip strip steak in pork dolor. Ad in esse biltong. Dolore tenderloin exercitation ad pork loin t-bone, dolore in chicken ball tip qui pig. Ut culpa tongue, sint ribeye dolore ex shank voluptate hamburger. Jowl et tempor, boudin pork chop labore ham hock drumstick consectetur tri-tip elit swine meatball chicken ground round. Proident shankle mollit dolore. Shoulder ut duis t-bone quis reprehenderit. Meatloaf dolore minim strip steak, laboris ea aute bacon beef ribs elit shank in veniam drumstick qui. Ex laboris meatball cow tongue pork belly. Ea ball tip reprehenderit pig, sed fatback boudin dolore flank aliquip laboris eu quis. Beef ribs duis beef, cow corned beef adipisicing commodo nisi deserunt exercitation. Cillum dolor t-bone spare ribs, ham hock est sirloin. Brisket irure meatloaf in, boudin pork belly sirloin ball tip. Sirloin sint irure nisi nostrud aliqua. Nostrud nulla aute, enim officia culpa ham hock. Aliqua reprehenderit dolore sunt nostrud sausage, ea boudin pork loin ut t-bone ham tempor. Tri-tip et pancetta drumstick laborum. Ham hock magna do nostrud in proident. Ex ground round fatback, venison non ribeye in.';
|
||||
|
||||
document.body.insertBefore(div, firstChild);
|
||||
|
||||
/* get size of unhyphenated text */
|
||||
divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;text-justification:newspaper;';
|
||||
spanHeight = span.offsetHeight;
|
||||
spanWidth = span.offsetWidth;
|
||||
|
||||
/* compare size with hyphenated text */
|
||||
divStyle.cssText = 'position:absolute;top:0;left:0;width:5em;text-align:justify;'+
|
||||
'text-justification:newspaper;'+
|
||||
Modernizr._prefixes.join('hyphens:auto; ');
|
||||
|
||||
result = (span.offsetHeight != spanHeight || span.offsetWidth != spanWidth);
|
||||
|
||||
/* results and cleanup */
|
||||
document.body.removeChild(div);
|
||||
div.removeChild(span);
|
||||
|
||||
return result;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// for the softhyphens test
|
||||
function test_hyphens(delimiter, testWidth) {
|
||||
try {
|
||||
/* create a div container and a span within that
|
||||
* these have to be appended to document.body, otherwise some browsers can give false negative */
|
||||
var div = document.createElement('div'),
|
||||
span = document.createElement('span'),
|
||||
divStyle = div.style,
|
||||
spanSize = 0,
|
||||
result = false,
|
||||
result1 = false,
|
||||
result2 = false,
|
||||
firstChild = document.body.firstElementChild || document.body.firstChild;
|
||||
|
||||
divStyle.cssText = 'position:absolute;top:0;left:0;overflow:visible;width:1.25em;';
|
||||
div.appendChild(span);
|
||||
document.body.insertBefore(div, firstChild);
|
||||
|
||||
|
||||
/* get height of unwrapped text */
|
||||
span.innerHTML = 'mm';
|
||||
spanSize = span.offsetHeight;
|
||||
|
||||
/* compare height w/ delimiter, to see if it wraps to new line */
|
||||
span.innerHTML = 'm' + delimiter + 'm';
|
||||
result1 = (span.offsetHeight > spanSize);
|
||||
|
||||
/* if we're testing the width too (i.e. for soft-hyphen, not zws),
|
||||
* this is because tested Blackberry devices will wrap the text but not display the hyphen */
|
||||
if (testWidth) {
|
||||
/* get width of wrapped, non-hyphenated text */
|
||||
span.innerHTML = 'm<br />m';
|
||||
spanSize = span.offsetWidth;
|
||||
|
||||
/* compare width w/ wrapped w/ delimiter to see if hyphen is present */
|
||||
span.innerHTML = 'm' + delimiter + 'm';
|
||||
result2 = (span.offsetWidth > spanSize);
|
||||
} else {
|
||||
result2 = true;
|
||||
}
|
||||
|
||||
/* results and cleanup */
|
||||
if (result1 === true && result2 === true) { result = true; }
|
||||
document.body.removeChild(div);
|
||||
div.removeChild(span);
|
||||
|
||||
return result;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// testing if in-browser Find functionality will work on hyphenated text
|
||||
function test_hyphens_find(delimiter) {
|
||||
try {
|
||||
/* create a dummy input for resetting selection location, and a div container
|
||||
* these have to be appended to document.body, otherwise some browsers can give false negative
|
||||
* div container gets the doubled testword, separated by the delimiter
|
||||
* Note: giving a width to div gives false positive in iOS Safari */
|
||||
var dummy = document.createElement('input'),
|
||||
div = document.createElement('div'),
|
||||
testword = 'lebowski',
|
||||
result = false,
|
||||
textrange,
|
||||
firstChild = document.body.firstElementChild || document.body.firstChild;
|
||||
|
||||
div.innerHTML = testword + delimiter + testword;
|
||||
|
||||
document.body.insertBefore(div, firstChild);
|
||||
document.body.insertBefore(dummy, div);
|
||||
|
||||
|
||||
/* reset the selection to the dummy input element, i.e. BEFORE the div container
|
||||
* stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area */
|
||||
if (dummy.setSelectionRange) {
|
||||
dummy.focus();
|
||||
dummy.setSelectionRange(0,0);
|
||||
} else if (dummy.createTextRange) {
|
||||
textrange = dummy.createTextRange();
|
||||
textrange.collapse(true);
|
||||
textrange.moveEnd('character', 0);
|
||||
textrange.moveStart('character', 0);
|
||||
textrange.select();
|
||||
}
|
||||
|
||||
/* try to find the doubled testword, without the delimiter */
|
||||
if (window.find) {
|
||||
result = window.find(testword + testword);
|
||||
} else {
|
||||
try {
|
||||
textrange = window.self.document.body.createTextRange();
|
||||
result = textrange.findText(testword + testword);
|
||||
} catch(e) {
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
|
||||
document.body.removeChild(div);
|
||||
document.body.removeChild(dummy);
|
||||
|
||||
return result;
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Modernizr.addTest("csshyphens", function() {
|
||||
|
||||
if (!Modernizr.testAllProps('hyphens')) return false;
|
||||
|
||||
/* Chrome lies about its hyphens support so we need a more robust test
|
||||
crbug.com/107111
|
||||
*/
|
||||
try {
|
||||
return test_hyphens_css();
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Modernizr.addTest("softhyphens", function() {
|
||||
try {
|
||||
// use numeric entity instead of ­ in case it's XHTML
|
||||
return test_hyphens('­', true) && test_hyphens('​', false);
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Modernizr.addTest("softhyphensfind", function() {
|
||||
try {
|
||||
return test_hyphens_find('­') && test_hyphens_find('​');
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user