mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
moved Object.prototype.run(..) to its own package...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
595db957d3
commit
cd08827c8c
@ -19,6 +19,7 @@ var requirejs_cfg = {
|
|||||||
'lib/actions': 'node_modules/ig-actions/actions',
|
'lib/actions': 'node_modules/ig-actions/actions',
|
||||||
'lib/features': 'node_modules/ig-features/features',
|
'lib/features': 'node_modules/ig-features/features',
|
||||||
//'lib/keyboard': './node_modules/ig-keyboard/keyboard',
|
//'lib/keyboard': './node_modules/ig-keyboard/keyboard',
|
||||||
|
'object-run': 'node_modules/object-run/run',
|
||||||
|
|
||||||
'lib/walk': 'node_modules/generic-walk/walk',
|
'lib/walk': 'node_modules/generic-walk/walk',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,21 +7,12 @@
|
|||||||
(function(require){ var module={} // make module AMD/node compatible...
|
(function(require){ var module={} // make module AMD/node compatible...
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
|
require('object-run')
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// Object...
|
// Object...
|
||||||
|
|
||||||
// Run a function in the context of an object...
|
|
||||||
//
|
|
||||||
Object.defineProperty(Object.prototype, 'run', {
|
|
||||||
enumerable: false,
|
|
||||||
value: function(func){
|
|
||||||
var res = func ? func.call(this) : undefined
|
|
||||||
return res === undefined ? this : res
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// Get all the accessible keys...
|
// Get all the accessible keys...
|
||||||
//
|
//
|
||||||
// This is different to Object.keys(..) in that this will return keys
|
// This is different to Object.keys(..) in that this will return keys
|
||||||
@ -33,8 +24,7 @@ Object.deepKeys = function(obj){
|
|||||||
res = res.concat(Object.keys(obj))
|
res = res.concat(Object.keys(obj))
|
||||||
obj = obj.__proto__
|
obj = obj.__proto__
|
||||||
}
|
}
|
||||||
return res.unique()
|
return res.unique() }
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Make a full key set copy of an object...
|
// Make a full key set copy of an object...
|
||||||
@ -45,8 +35,7 @@ Object.flatCopy = function(obj){
|
|||||||
Object.deepKeys(obj).forEach(function(key){
|
Object.deepKeys(obj).forEach(function(key){
|
||||||
res[key] = obj[key]
|
res[key] = obj[key]
|
||||||
})
|
})
|
||||||
return res
|
return res}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
5
ui (gen4)/package-lock.json
generated
5
ui (gen4)/package-lock.json
generated
@ -1437,6 +1437,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
|
||||||
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
|
"integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
|
||||||
},
|
},
|
||||||
|
"object-run": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-run/-/object-run-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-Gfd2RZOPfItVfZnPxi5rnGGa1Kix2AKMNoZyLDbIZ/AqB2k6zcULxpwyg1o56QHFL9KTJPVIkgiEQH7ipcUXUA=="
|
||||||
|
},
|
||||||
"once": {
|
"once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
"ig-features": "^3.4.2",
|
"ig-features": "^3.4.2",
|
||||||
"ig-object": "^5.0.8",
|
"ig-object": "^5.0.8",
|
||||||
"moment": "^2.26.0",
|
"moment": "^2.26.0",
|
||||||
|
"object-run": "^1.0.0",
|
||||||
"requirejs": "^2.3.6",
|
"requirejs": "^2.3.6",
|
||||||
"requirejs-plugins": "^1.0.2",
|
"requirejs-plugins": "^1.0.2",
|
||||||
"sharp": "^0.25.3",
|
"sharp": "^0.25.3",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user