GoogleChromeLabs / Kv Storage Polyfill
Licence: other
A polyfill for the kv-storage built-in module.
Stars: ✭ 130
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Kv Storage Polyfill
Proposal Array Unique
ECMAScript proposal for Deduplicating method of Array
Stars: ✭ 96 (-26.15%)
Mutual labels: polyfill
Polyfill Php55
This component provides functions unavailable in releases prior to PHP 5.5.
Stars: ✭ 105 (-19.23%)
Mutual labels: polyfill
Fixed Sticky
DEPRECATED: A position: sticky polyfill that works with filamentgroup/fixed-fixed for a safer position:fixed fallback.
Stars: ✭ 1,490 (+1046.15%)
Mutual labels: polyfill
Webvr Polyfill
Use WebVR today, without requiring a special browser build.
Stars: ✭ 1,343 (+933.08%)
Mutual labels: polyfill
React Suspense Polyfill
Polyfill for the React Suspense API 😮
Stars: ✭ 99 (-23.85%)
Mutual labels: polyfill
Resize Observer Polyfill
A polyfill for the Resize Observer API
Stars: ✭ 1,530 (+1076.92%)
Mutual labels: polyfill
Date Time Format Timezone
Surgically polyfills timezone support in Intl.DateTimeFormat API
Stars: ✭ 94 (-27.69%)
Mutual labels: polyfill
Ts Polyfill
Runtime polyfills for TypeScript libs, powered by core-js! 🔋 🔩
Stars: ✭ 122 (-6.15%)
Mutual labels: polyfill
Polyfill Util
This component provides binary-safe string functions, using the mbstring extension when available.
Stars: ✭ 1,364 (+949.23%)
Mutual labels: polyfill
Theraot
Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.
Stars: ✭ 112 (-13.85%)
Mutual labels: polyfill
Polyfill
Polyfill implements newer Ruby features into older versions.
Stars: ✭ 98 (-24.62%)
Mutual labels: polyfill
Polyfill Php56
This component provides functions unavailable in releases prior to PHP 5.6.
Stars: ✭ 1,470 (+1030.77%)
Mutual labels: polyfill
Eqcss
EQCSS is a CSS Reprocessor that introduces Element Queries, Scoped CSS, a Parent selector, and responsive JavaScript to all browsers IE8 and up
Stars: ✭ 1,513 (+1063.85%)
Mutual labels: polyfill
Match Media
Universal polyfill for match media API using Expo APIs on mobile
Stars: ✭ 95 (-26.92%)
Mutual labels: polyfill
Nullable
A source code only package which allows you to use .NET's nullable attributes in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework.
Stars: ✭ 106 (-18.46%)
Mutual labels: polyfill
Document.scrollingelement
A polyfill for document.scrollingElement as defined in the CSSOM specification.
Stars: ✭ 122 (-6.15%)
Mutual labels: polyfill
Touch Action
Disable 300ms delay on mobile using CSS touch-action or asynchronously download FastClick as polyfill
Stars: ✭ 119 (-8.46%)
Mutual labels: polyfill
kv-storage polyfill
A polyfill for the kv-storage built-in module.
Usage
First, ensure you have an Import Map defined to enable the browser version where supported:
<script type="importmap">
{
"imports": {
"/node_modules/kv-storage/dist/kv-storage-polyfill.mjs": [
"std:kv-storage",
"/node_modules/kv-storage/dist/kv-storage-polyfill.mjs"
]
}
}
</script>
Then import the polyfill. If the browser supports std:kv-storage
natively, it will use that instead:
import { storage } from '/node_modules/kv-storage/dist/kv-storage-polyfill.mjs';
(async () => {
await storage.set("mycat", "Tom");
console.assert(await storage.get("mycat") === "Tom");
console.log(await storage.entries());
// Logs [["mycat", "Tom"]]
await storage.delete("mycat");
console.assert(await storage.get("mycat") === undefined);
})();
Available Module Formats
ES Modules: (for everything)
import storage from 'kv-storage-polyfill'; // default storage namespace
import { StorageArea } from 'kv-storage-polyfill'; // instantiable StorageArea class
import storage, { StorageArea } from 'kv-storage-polyfill'; // you can combine
CommonJS: (for Node/browserify)
const storage = require('kv-storage-polyfill'); // default storage namespace
const storage = require('kv-storage-polyfill').default // also works, just an alias
const { StorageArea } = require('kv-storage-polyfill'); // instantiable StorageArea class
UMD/AMD: (for compatibility)
define(['/web/kv-storage-polyfill.umd.js'], function(storage) {
storage === storage.default // default storage area
storage.StorageArea // instantiable StorageArea class
});
Browser Globals: (for demos)
<script src="/web/kv-storage/polyfill.umd.js"></script>
<script>
const { StorageArea } = kvStoragePolyfill;
const storage = kvStoragePolyfill; // optional `.default` if you want
</script>
License
Apache 2
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].