julien-maurel / js-storage Goto Github PK
View Code? Open in Web Editor NEWJS Storage is a plugin to simplify access to local and session storage in HTML5
JS Storage is a plugin to simplify access to local and session storage in HTML5
What are the licensing options for this library?
Hi. I would like to ask if there's a possibility to add this plugin to maven repository to achieve easily access to it? I also tried to create a webjar, but there was an error due to some license issues. The error communicate I got is below.
Got package info for org.webjars.bowergithub.julien-maurel js-storage 1.0.4
Determining dependency graph
No dependencies.
Resolving licenses & dependencies for org.webjars.bowergithub.julien-maurel js-storage 1.0.4
All attempts to determine an acceptable license have been exhausted. The bower.json file did not contain a spec-compliant license definition and the license could not be determined by trolling through the source repo: https://github.com/julien-maurel/js-storage.git
The acceptable open source software licenses are at bottom of: https://bintray.com/docs/api/
The provided licenses were:
This problem will likely need to be resolved by working with the library maintainers directly.
Regards,
Kamil
how can i set() proses_send value in this my data array ?
{
"status": [
{
"waybill_number": "1234567890",
"jml_hawb": 3500,
"proses_send": 3012,
"siap_send": 488,
"finish_send": 0
},
{
"waybill_number": "9999999999",
"jml_hawb": 1000,
"proses_send": 1000,
"siap_send": 0,
"finish_send": 0
}
]
}
I have tried ns.sessionStorage.set('status[0].siap_send',33333) but this makes new data
`{
"status": [
{
"waybill_number": "1234567890",
"jml_hawb": 3500,
"proses_send": 3013,
"siap_send": 487,
"finish_send": 0
},
{
"waybill_number": "9999999999",
"jml_hawb": 1000,
"proses_send": 1000,
"siap_send": 0,
"finish_send": 0
}
],
"status[0]": {
"siap_send": 33333
}
}
bangdoan commented 4 days ago
I got this problem when I have a local storage key with value is "false" and in the code, I have used the function isEmpty and it always returns true even the value of the item is "false".
Hi,
i'm quite new to the local storage feature, so i tried out your lib which works good for simple values.
When i want to store an element, it get serialized to JSON but wrong.
Consider this example:
// initialize the new HTML elements
var tabSpan = $('', {
html: 'Message Center'
});
var messageCenterAnchor = $('', {
href: '/user/messages',
html: tabSpan
});
var newListItem = $('
Then i do:
storage.set('notification-value-0, newListItem );
Stored will be:
key: 'notification-value-0 value: {0":{},"length":1}
I read about disabling automatic JSON rendering, but failed.
Always the same outcome.
Perhaps you've a clue how i can store elements.
Rgds.
Franz
Storages is not defined
When I try to get config.item I get "Uncaught TypeError: Cannot read property 'item' of null"
.
This should return null/undefined and init default value for config item instead of throwing an exception.
Example:
if(!this.storage.get('config') {
this.storage.set('config', {});
}
First of all, Great library. Thanks
I faced with need that for example I need to remove all key, which starts with "payment"
For this I used next code cookies.remove(cookies.keys().filter((key) => key.startsWith('payment')));
But it is not efficient one... Why not to use this one with regex in you library?
For your discretion
If you surf in private mode in Safari on iOS the js-storage fails because there is no storage_available or localCookieStorage.
Hopefully I dont get it wrong, but it seems there is no support for the secure flag on cookie storage.
So, the request is to extend the cookie storage handling by the secure flag.
Error message:
Uncaught TypeError: t.charCodeAt is not a function
-> store.everything.min.js?v=9609:2
Using in a bootstrap jquery project like this:
<script src="./node_modules/store/dist/store.everything.min.js"></script>
<script src="./js/app.js"></script>
Script:
var data = {lon: -666, lat: -666, key: 666};
store.set('weather', data, new Date().getTime() + 3000); // expiration in 3 sec
In your read Me can you please elaborate on how to use namespace. An example on how to set and get values with namespace and perform various operations will be appreciated.
I followed the examples and understand the localstorage but how to integrate the namespace is little bit confusing. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.