Lu Yuan
For those of you that prefer JavaScript (...my people...), I found a really simple animated GIF detection library on NPM: animated-gif-detector. Its API couldn't be shorter:
var fs = require('fs');
var animated = require('animated-gif-detector');
> animated(fs.readFileSync('wtf.gif'));
// true
> animated(fs.readFileSync('blank.gif'));
// false
var anyToJSON = require("anyToJSON");
anyToJSON.csv({path: "100.csv"}, function(){
console.log(anyToJSON.data )
})
var jsop = require('jsop')
var config = jsop('config.json')
config.foo = 'bar'
endpoint:id:wikipedia pages:[Malta Prague "New York"]
--->
[
{
"endpoint": {
"id": "wikipedia"
}
},
{
"pages": [
"Malta",
"Prague",
"New York"
]
}
]
- endpoint:
id: wikipedia
- pages:
- Malta
- Prague
- New York
--->
{
"endpoint": {
"id": "wikipedia"
},
"pages": [
"Malta",
"Prague",
"New York"
]
}
// url (required), options (optional)
fetch('/some/url', {
method: 'get'
}).then(function(response) {
}).catch(function(err) {
// Error :(
});
var observer = new MutationObserver(function(mutations) {
// For the sake of...observation...let's output the mutation to console to see how this all works
mutations.forEach(function(mutation) {
console.log(mutation.type);
});
});
// Notify me of everything!
var observerConfig = {
attributes: true,
childList: true,
characterData: true
};
// Node, config
// In this case we'll listen to all changes to body and child nodes
var targetNode = document.body;
observer.observe(targetNode, observerConfig);