{"_id":"s-declare","_rev":"12-dbee29c9e590a3ba77c2e340db395a72","name":"s-declare","description":"Node modules declaration","dist-tags":{"latest":"1.7.0"},"versions":{"1.2.3":{"name":"s-declare","version":"1.2.3","description":"Node lazy injection","main":"index.js","scripts":{"test":"node test/test.js"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"181b18dd47866fc35c74caeb23667a33a1201dc5","_id":"s-declare@1.2.3","_shasum":"4b885dc1bdd4ab3322b402afd5a9426e20daea95","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"4b885dc1bdd4ab3322b402afd5a9426e20daea95","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.2.3.tgz","integrity":"sha512-Ty4o0viUY//8ypzUaFCL7i636XCLrb4xGHgkWf2nrbfmm3PflFAoxHj4G1DeeZldVntNoslnrRoJ2APyTBVTkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBo56KjsFew9bvIDg1pCPQxRuws1QZNciaE0BVrg0YLsAiAsYLkvUrF/Fkj1sRCYcJyUlVp5pJ2CZ1LHL7RJLvleAw=="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/s-declare-1.2.3.tgz_1476124084407_0.09706532722339034"}},"1.2.6":{"name":"s-declare","version":"1.2.6","description":"Node modules injection","main":"index.js","scripts":{"test":"node test/test.js"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"b45095bb12a47e7170a831a51df4228b251311f6","_id":"s-declare@1.2.6","_shasum":"22ecc2b2deb984515fc462868f119c305c43c854","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"22ecc2b2deb984515fc462868f119c305c43c854","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.2.6.tgz","integrity":"sha512-A8GKmPGBDAYZAryhPveXSBiDkVntWvC0Jp+XtzITtkw1qiDyIjIY5lnCX9SWd+LFARTwaObG8NNcDRHGCZDuPA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+MMumFTC8mSmWefeFSiiW1g2YF3piNccpHCs1XuTlxwIgEfnFw1ak1kCwv0ZiPoS+Y8tcIbHJ6I5perHuaKsXdIo="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/s-declare-1.2.6.tgz_1476124196589_0.22419771668501198"}},"1.2.7":{"name":"s-declare","version":"1.2.7","description":"Node modules injection","main":"index.js","scripts":{"test":"node test/test.js"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"b45095bb12a47e7170a831a51df4228b251311f6","_id":"s-declare@1.2.7","_shasum":"d6ed39b37eddceeb4009542025bc529b4ea42cc0","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"d6ed39b37eddceeb4009542025bc529b4ea42cc0","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.2.7.tgz","integrity":"sha512-Xo8HkNkYuMkKNoooSRo+HLwS5/oqQAo5zCSrME2muC3Ck5TQ1dTzdmnQpQuVZTI34RVBkMRdZ6Pb7hZbkIJDmA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBv9ax+drSlYUO96QrZ3JQ70kp4BNlvVs7EdSDIDjOx9AiEAqzC9RRd0QN48duzpajNniXQdrOC688ahjsCITF8rfJ8="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/s-declare-1.2.7.tgz_1476124232459_0.2836821782402694"}},"1.2.8":{"name":"s-declare","version":"1.2.8","description":"Node modules injection","main":"index.js","scripts":{"test":"node test/test.js"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"834d2b25c4138ed095b5b2b58640973ea13d64ac","_id":"s-declare@1.2.8","_shasum":"a046e26502e39bd955fa4529710bbc8abfe8598f","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"a046e26502e39bd955fa4529710bbc8abfe8598f","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.2.8.tgz","integrity":"sha512-OFO69itHDNid8F4+/zA01IHja31964VfFjjDU5YmP5sjxEpNOUuNaM7p7hOlkuzy3SHU1hkSXyLs0h1IdozdVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHztMnqsMopikGGy26lCpPKly3oGmmBc07EGpm0yeXEXAiEAkrsgSLwwUeMnkJd7akEeGzgLKZD9RxJQF+zx8C5xwSA="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/s-declare-1.2.8.tgz_1476193294537_0.6376076473388821"}},"1.5.1":{"name":"s-declare","version":"1.5.1","description":"Node modules declaration","main":"index.js","scripts":{"test":"node test/test.js","debug":"devtool test/test"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"ddc050a4ce877108c4973be116e252168f315464","_id":"s-declare@1.5.1","_shasum":"82249c5ffc8736d3eaabda22e5c1997ebc4ab61c","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"82249c5ffc8736d3eaabda22e5c1997ebc4ab61c","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.5.1.tgz","integrity":"sha512-vJfDzI8Tu83n6X2et6nJRWCrfsK9HWbWiV1XApROtDsXWWINwGpEKgPAVh72c9TWoKSTiNX8Y5VPkXAfWanUBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEvBdHMIb8+ppZJsLDTk+Pf6MLgl4JnXH/R0ViYB6DSOAiEA4aUyQNKPbQK3NmGwCNu/9eIYhjkGoshul/PjSDTRjBQ="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/s-declare-1.5.1.tgz_1476292156438_0.3690816261805594"}},"1.5.2":{"name":"s-declare","version":"1.5.2","description":"Node modules declaration","main":"index.js","scripts":{"test":"node test/test.js","debug":"devtool test/test"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"e3cd99804a9d803953f3ad8dc6d67635deb6299d","_id":"s-declare@1.5.2","_shasum":"272414dee0537b31a2cbefb292133dc87156c5ea","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"272414dee0537b31a2cbefb292133dc87156c5ea","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.5.2.tgz","integrity":"sha512-6DUinXCQhWNSSiW5VLoChGccKsxLYvSDg0A2NE6cRiuzAy0bWFDJfv7YOd9KWRZSF6lmIdNfw36BWHUBKuHBUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3pBvefmoTtSwSJUIj7l79Q4faBI6kSsUT/PSfN0GO8gIhAMCu4LGygfWGe2EWF6RTwwavqJ1WtvP1Dhe5p+oTRiqS"}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/s-declare-1.5.2.tgz_1476726769003_0.6628202544525266"}},"1.6.1":{"name":"s-declare","version":"1.6.1","description":"Node modules declaration","main":"index.js","scripts":{"test":"node test/test.js","debug":"devtool test/test"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"gitHead":"d8a4c5918db7f6f473e6dbadfe4f4d95f3336d74","_id":"s-declare@1.6.1","_shasum":"6030c8f88f5b207d643ed3455ffa181d47d2fc91","_from":".","_npmVersion":"3.10.6","_nodeVersion":"4.5.0","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"6030c8f88f5b207d643ed3455ffa181d47d2fc91","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.6.1.tgz","integrity":"sha512-TWf19HGilTuSpEtMJZqQ8AqSxm9Z6WHSLuNRYchYcAtpgKneivnxqZ8ATlwD0A9F/VwFrloAspCBs+r8Y7pEBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDU/AGO5xVpRw++QwHmbMq/V36rPFwAzp8wXYTWYWvtFAiEA8vmtdUcC2e29NjqhvLUyYqfbVEMpoq3sFYJDvyYs4bg="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/s-declare-1.6.1.tgz_1477316416405_0.42824900848791003"}},"1.7.0":{"name":"s-declare","version":"1.7.0","description":"Node modules declaration","main":"declare.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","rebuild":"gulp concat&gulp minify","debug":"devtool test/test"},"homepage":"https://github.com/sajera/s-declare#readme","repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"keywords":["s-declare","declare","declarator"],"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"license":"MIT","dependencies":{},"devDependencies":{"gulp":"^3.9.1","gulp-concat":"^2.6.1","gulp-order":"^1.1.1","gulp-uglify":"^2.0.0","gulp-wrap":"^0.13.0","s-is":"^1.2.0"},"gitHead":"73cd878a7f5b49ce70899f2c28ad25c71c6a4f25","_id":"s-declare@1.7.0","_shasum":"9f817398edd0ee206bb5030bd4f74d41f1638e85","_from":".","_npmVersion":"4.0.2","_nodeVersion":"6.9.1","_npmUser":{"name":"sajera","email":"allsajera@gmail.com"},"dist":{"shasum":"9f817398edd0ee206bb5030bd4f74d41f1638e85","tarball":"https://registry.npmjs.org/s-declare/-/s-declare-1.7.0.tgz","integrity":"sha512-ZvIx+zDHRXa84RwTGy208SObhB7/GKqbNwTZBehhBUeQymSgWClCw6fZX1N5gZZdl/1oXxC4pLx42Z+p/y0MrA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNHVGlDg1qTWUiwJOlXh1p/GHTtIbfqpY2XA9b29GLxAIgau7bq2QXNFjQhQ4SRaTIZ5Zw4A4DIcpOWwdQfLfZPNg="}]},"maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/s-declare-1.7.0.tgz_1481207561390_0.09978712815791368"}}},"readme":"\r\n[![NPM version][npm-image]][npm-url]\r\n[![License][license-image]][license-url]\r\n\r\ns-declare\r\n===============\r\nAn easy way to create named modules within the application.\r\n\r\n### installation for ```Node.js```\r\n\r\n```shell\r\nnpm i s-declare --save\r\n```\r\n\r\n### installation for ```Browser```\r\n\r\n```shell\r\nbower i s-declare --save\r\n```\r\n\r\n\r\nDeclaration of module\r\n--------------\r\n\r\nArguments it's a modules which be applied to function for creating module. Of course, we can use the standard way.\r\n\r\n```javascript\r\nvar declare = require('s-declare');\r\n// write like node module and declaration module\r\nmodule.exports = declare('test', function ( path, http, url ) {\r\n    require('path') == path; // => true\r\n    // code of module\r\n    return {}; // stored like a module 'test' it can be any\r\n});\r\n\r\n// got it\r\ndeclare.require('test'); // => stored module 'test'\r\n```\r\n\r\n\r\n\r\n\r\n    \r\nMore complicated\r\n--------------\r\n\r\nWhen we create a separate module, create a declaration of files related to this module.\r\n\r\n```javascript\r\nvar declare = require('s-declare');\r\n\r\n// then create module\r\nmodule.exports = declare('myModule', ['path', 'http', 'url', './test/test.lib.js',\r\n    function ( path, http, url, test ) {\r\n        // code of module\r\n        return {}; // stored like a module\r\n    }]);\r\n    \r\nif(\r\n    declare.require('myModule') == module.exports\r\n    && declare.require('myModule') == require('./path/to/file')\r\n) {\r\n    console.log( 'Completely usability victory !!!' );\r\n} else {\r\n    console.log( 'Completely fail ...' );\r\n};\r\n```\r\n\r\nNo store\r\n--------------\r\n\r\nWhen we create a module for NPM no need stored parts of module in declarator.This is not just pointless and even harmful. We can only use the declarator for file management. To create a user-friendly module supplier.\r\n\r\n```javascript\r\nvar declare = require('s-declare');\r\n\r\n// with name null, a declarator isn't stored module\r\nmodule.exports = declare(null, [\r\n    'http',\r\n    './lib/part-1.js',\r\n    './lib/part-2.js',\r\n    './lib/part-3.js',\r\n    './lib/part-4.js',\r\n    function ( http, part1, part2 ,part3, part4 ) {\r\n        \r\n        return {\r\n            util: util,\r\n            part1: part1,\r\n            readOnly: function () {\r\n                return Object.assign({}, part3, part4);\r\n            }\r\n        };\r\n    }]);\r\n```\r\n\r\n\r\n[npm-image]: https://badge.fury.io/js/s-declare.svg\r\n[npm-url]: https://npmjs.org/package/s-declare\r\n[license-image]: http://img.shields.io/npm/l/s-declare.svg\r\n[license-url]: LICENSE\r\n","maintainers":[{"name":"sajera","email":"allsajera@gmail.com"}],"time":{"modified":"2022-06-26T15:08:24.538Z","created":"2016-10-10T18:28:06.333Z","1.2.3":"2016-10-10T18:28:06.333Z","1.2.6":"2016-10-10T18:29:57.614Z","1.2.7":"2016-10-10T18:30:34.413Z","1.2.8":"2016-10-11T13:41:35.190Z","1.5.1":"2016-10-12T17:09:18.060Z","1.5.2":"2016-10-17T17:52:50.811Z","1.6.1":"2016-10-24T13:40:17.940Z","1.7.0":"2016-12-08T14:32:43.591Z"},"homepage":"https://github.com/sajera/s-declare#readme","keywords":["s-declare","declare","declarator"],"repository":{"type":"git","url":"git+https://github.com/sajera/s-declare.git"},"author":{"name":"Sajera: Serhii P","email":"allsajera@gmail.com"},"bugs":{"url":"https://github.com/sajera/s-declare/issues"},"license":"MIT","readmeFilename":"readme.md"}