{"_id":"6-to-library","_rev":"22-a8a23f07091bb64636b45a08dfc68d74","name":"6-to-library","description":"The 6to5 formatter for library authors.","dist-tags":{"latest":"0.3.4"},"versions":{"0.0.0":{"name":"6-to-library","version":"0.0.0","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test","pretty-test":"node test | tap-dot"},"dependencies":{"101":"0.8.x","6to5":"2.4.x","map-to":"0.0.x","basename":"0.1.x"},"devDependencies":{"dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","tap-dot":"0.2.3","trimmer":"1.0.0","web-umd":"git+https://github.com/tomekwi/web-umd.6to5"},"gitHead":"74b7ca1d83f1adba0823334ccf1fca6301b0ad72","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.0.0","_shasum":"54854326b4d8edaf0e01b2b4c598f3390cb0e3d1","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"54854326b4d8edaf0e01b2b4c598f3390cb0e3d1","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.0.0.tgz","integrity":"sha512-+c1dHevYr2SsZTLRR+AYixBDi6RQ7Mj5AK/eZaCFv6DE1nOFuLRdfBAIAkH8dPp59zu3INu0Rz355a8hZrBfNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTf99S5DhW30h/4F35m1agQoyw9u1GtxUUIeatDQRAxAIgDMcRnFtNjmCI2KLB52iAKHsIgeN2WtJglvoLUuP22Ww="}]}},"0.0.1":{"name":"6-to-library","version":"0.0.1","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test","coveralls":"istanbul cover test --report lcovonly && coveralls < ./coverage/lcov.info"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.1.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","coveralls":"2.11.2","dirs":"0.1.2","is-directory":"0.2.3","istanbul":"0.3.5","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"4b0a752190e58ccf853ccc2ef0c84fcf6f10f1f8","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.0.1","_shasum":"9836b904cfa17f20cc0a752f2337d69f90208780","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"9836b904cfa17f20cc0a752f2337d69f90208780","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.0.1.tgz","integrity":"sha512-bmAl/hrdqnT6EF+fKaKIqRf3rnQ36tUTv7hzW1y1melzfrNgiXgqhQg5ZD+d52cYn41eJ0CgHDhc96TsTmkiqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDNxQ44zoAp4zeka+v/hLtlZpi8ESoMh34JrR604JGuuAiEAlb8kfoWjLTa7xla5VaPAu0Xhwgli6Nqu0c1hIBDqAn4="}]}},"0.1.0":{"name":"6-to-library","version":"0.1.0","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.1.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"9967d7bb9cfa321b452aefb37395329e25a48025","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.1.0","_shasum":"ccf8db564625056c452c61dc307ccc976625c286","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"ccf8db564625056c452c61dc307ccc976625c286","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.1.0.tgz","integrity":"sha512-daezZtwXDd8dEE/1XF0Rh53BNpIcZitXarOlZk/f+Hyp9zanJOh6ANoNAWPHl1HN1w0Zo7mvws4527n5BD4y0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuJhEbLE7syJfcQH7LX8eLme+GBlD0vjREQmM9mgUtvQIhAIrJy51Am9s9qU6qFgWvgjj6iHpmgj/lTrHyULWk5vPP"}]}},"0.2.0":{"name":"6-to-library","version":"0.2.0","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.1.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"809d5281f27e3d7981bcecc7e39b78788d6bcb71","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.2.0","_shasum":"61e4939af010f63eee0b651fb5802b91f70ea766","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"61e4939af010f63eee0b651fb5802b91f70ea766","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.2.0.tgz","integrity":"sha512-iLnF/B0SShLyNyxf0i0PbU1JFS0kpo6UtpZuZCAZ5i5j1iMbYaahoeMeg/iOEcSVyMc1UpP8s/UbQmOfrWyDlQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGmaTnPgC4XMIVshaogciEr2XkV2J/LNG0YQukL0K+rmAiEAzFdVGTia2gln+mD+9MAhgtNE+BIUgQMu1niEnALxAM0="}]}},"0.3.0-alpha":{"name":"6-to-library","version":"0.3.0-alpha","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.1.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"f7bb6e806f86136da542e3d6d9be5a2a5904c537","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.0-alpha","_shasum":"5d9a8616b4f5bedec0a4c36701494c7907a179fa","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"5d9a8616b4f5bedec0a4c36701494c7907a179fa","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.0-alpha.tgz","integrity":"sha512-uAG6bRF2yakqRS5egEe755ewWgZZ67eDf8JkY0VJjTvpXEkN5c4Ab5K9V0JdqYESCT0azWgmcWAu35nagqOPAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8UmCx7taO95nAw6sfGYP3r41I7zJS2XaXYdx9yvwvJwIgUX8M9KBONcJx51yJAsG3q0KdeHF1caUo5BMrecRqBkU="}]}},"0.3.0":{"name":"6-to-library","version":"0.3.0","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.1.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"b88223a7b4d6857d32f2b20566ba37bf2875ac60","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.0","_shasum":"1c496541e118a34b74677089ce92c3d919b2f4b8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"1c496541e118a34b74677089ce92c3d919b2f4b8","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.0.tgz","integrity":"sha512-DdgYzISVPEGvcRZpHQPSLM0837cIb71d2UhTcBC0o0JryZhAi6mNBKgBN8Gg5Kgw46SLSWkC98p2v+DZ0zU2Yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYzOeul37MIRKEReTLsl0GDmIi7NM3zJCO5x8YGRjvrAiASSE3t/nSxPXtth5oWA7QCpzhvd9od6vUYRC9iCAiTbw=="}]}},"0.3.1":{"name":"6-to-library","version":"0.3.1","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"0.2.x","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"80891a023f0c603e5a7ab283fdd7ea346d464001","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.1","_shasum":"d7c8bcd0a151719e2f4ab486a809fcacdec87e0a","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"d7c8bcd0a151719e2f4ab486a809fcacdec87e0a","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.1.tgz","integrity":"sha512-QsjiL4bgi+N7HAdHO1CifUkLIe3SjcniL1SzI3GajplKi5yc3Jbnhhyq4AcPng0drXB9kcliNefe/7LAnF674Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXbsg26mCNlD4L1bkGz9pTQls9M2juqQKMB2PZObYvDAiEA0i/ed1sr+k7JDxcN7APguPFUIAkEPlB3LpCdtA2v6Aw="}]}},"0.3.2":{"name":"6-to-library","version":"0.3.2","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"~0.2.2","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"975fdcb219ae686d0cc1f139c1299aa07c9f3fff","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.2","_shasum":"7a4d8625ae37b39ecba6b4b1de92e21b71e7fb71","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"7a4d8625ae37b39ecba6b4b1de92e21b71e7fb71","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.2.tgz","integrity":"sha512-SFqugXmjH9fxtiHaDiX/hYJ6LLEGn2qSVfQaAHZTOQnt+jX55in7EsYIiEN2ykSWff1K8FtfbyQJ5w1626AsbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDBFWCzkEztZ9QeG+Fyk+Z2ucR+3MwXlKSTdtA3ONXjhQIgXaVRNuCRSh0lnyfXbCYBy3fSYuQQ8GRVc+hTz0rIs+E="}]}},"0.3.3":{"name":"6-to-library","version":"0.3.3","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"~0.2.2","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"fd081a009350a881828227b7e67b4cb3e53289fa","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.3","_shasum":"a255b5251d83610b11897c1f511c662d2e8c909e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"a255b5251d83610b11897c1f511c662d2e8c909e","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.3.tgz","integrity":"sha512-/e9WhzzWkxRD5d4Ntn9c61sr/1kOPI9j/CtYN7SvtX8NhJOko7FnX6ETSHBY6QUnDtP8UCdd+M7QTISwUDd0rw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzSl5zaxaMqXi3wKPSBnLoLErwck/4ydtz80aNU8NXOAIgQiH7gXnVh1qRmerEw5kemYp/rQJpp5PdZSHFpD92EqU="}]}},"0.3.4":{"name":"6-to-library","version":"0.3.4","description":"The 6to5 formatter for library authors.","license":"MIT","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"main":"source/index.js","repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"scripts":{"test":"node test"},"dependencies":{"101":"0.8.x","6to5":"2.5.x","as":"~0.2.2","basename":"0.1.x"},"devDependencies":{"6-to-library":"git+https://github.com/tomekwi/6-to-library.js","dirs":"0.1.2","is-directory":"0.2.3","tape":"3.0.3","trimmer":"1.0.0"},"gitHead":"6d26c2b41ff8c42f9df573949feb31441827cd42","bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"homepage":"https://github.com/tomekwi/6-to-library.js","_id":"6-to-library@0.3.4","_shasum":"d7aacb0ccdb17442e3eb64f69e0acacbc74e23b1","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"tomekwi","email":"t.wiszniewski@gmail.com"},"maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"dist":{"shasum":"d7aacb0ccdb17442e3eb64f69e0acacbc74e23b1","tarball":"https://registry.npmjs.org/6-to-library/-/6-to-library-0.3.4.tgz","integrity":"sha512-oB8xHcURAAMN5tiJla8mH340dJjY81Gzc2hpTQvHcJV2BmZy2Lpmhqx9J7R8vBoY9ZmAA4ZGEQ7MQD+2rlt0pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGO2H4JphXxrwxEoybN4GE+IxAzGWdCLPlvNP1luiBGgIgALYf5gItGK1UTHw3BvdzQ7xO4hzw3SLdh/SFDOfTUEs="}]}}},"readme":" [![Build status](https://img.shields.io/travis/tomekwi/6-to-library.js/master.svg?style=flat-square)](https://travis-ci.org/tomekwi/6-to-library.js)\n [![Code climate](https://img.shields.io/codeclimate/github/tomekwi/6-to-library.js.svg?style=flat-square)](https://codeclimate.com/github/tomekwi/6-to-library.js)\n [![David](https://img.shields.io/david/tomekwi/6-to-library.js.svg?style=flat-square)](https://david-dm.org/tomekwi/6-to-library.js)\n\n6-to-library\n============\n\n**This library is deprecated.** It turns out, that the core 6to5 team was working on the same feature in parallel. Starting from version 2.7.0, 6to5 exports a module directly when only the `default` is exported.\n\n***\n\n**The 6to5 formatter for library authors.**\n\n[“Author in ES6, distribute everywhere.”][ryan] Seamlessly target NPM and browsers.\n\n\n[ryan]: http://ryanflorence.com/2013/es6-modules-and-browser-app-delivery/ \"“ES6 Modules, Build Tools and Browser App Delivery” by Ryan Florence\"\n\n\n\n\nInstallation\n------------\n\n```sh\n> npm install 6-to-library\n```\n\n\n\n\nUsage\n-----\n\n\n##### 1. Write your library\n\nSay your library should uppercase the first letter of a string. You write in ES6 in the file `es6/up-first-letter.js`:\n\n```js\nexport default function (string) {\n  return string.charAt(0).toLocaleUpperCase() + string.substr(1);\n  }\n```\n\n\n##### 2. Transpile through 6to5's CLI\n\n```sh\n$ 6to5  --modules 6-to-library  --out-file index.js  es6/up-first-letter.js\n```\n\nMake sure `6to5` is installed globally, or run the local `node_modules/6to5/bin/6to5/index.js` instead.\n\n\n#####  …or programatically:\n\nAdd the option `modules: \"6-to-library\"` to your `require(\"6to5\").transform` call. You can also pass this option directly to [gulp-6to5][] or [grunt-6to5][].\n\n[gulp-6to5]: https://www.npmjs.com/package/gulp-6to5\n[grunt-6to5]: https://www.npmjs.com/package/grunt-6to5\n\n\n##### 3. Publish your library\n\n`npm publish`, `git push`, or whatever you normally do.\n\n\n##### 4. Profit!\n\nAfter your users install your library, they can do whatever they're used to. Without any transformer.\n\nUsing CommonJS in node:\n\n```js\nvar upFirstLetter = require(\"up-first-letter\");\nupFirstLetter(\"ęéë\");  // » \"Ęéë\"\n```\n\nUsing globals in the browser:\n\n```html\n<script src=\"bower_components/up-first-letter/index.js\"></script>\n<script>\n  upFirstLetter(\"ęéë\");  // » \"Ęéë\"\n</script>\n```\n\nUsing AMD with RequireJS:\n\n```js\nrequire([\"up-first-letter/index\"], function (upFirstLetter) {\n  upFirstLetter.default(\"ęéë\");  // » \"Ęéë\"\n  });\n```\n\nAnd using the shiny new ES6 modules:\n\n```js\nimport upFirstLetter from \"./up-first-letter/es6/up-first-letter\";\nupFirstLetter(\"ęéë\");  // » \"Ęéë\"\n```\n\n\n\n\nExample\n-------\n\nYou can have a look at the npm module [as][as.js], built using the 6-to-library formatter.\n\n[as.js]: https://www.npmjs.com/package/as\n\n\n\n\nHow does it work\n----------------\n\n##### Export/import names\n\n[“ECMAScript 6 favors the single/default export style, and gives the sweetest syntax to importing the default.”][david-herman] We do the same. If you only export the default, your library will work as seamlessly as in the examples above.\n\nOtherwise you'll have to reference each export by its specifier:\n\n```js\n// original.js\nexport default 1;\nexport const two = 2;\n\n// CommonJS\nvar one = require('original').default;\nvar two = require('original').two;\n\n// Globals\nvar one = original.default;\nvar two = original.two;\n```\n\n[david-herman]: https://esdiscuss.org/topic/moduleimport#content-0\n\n\n##### Global names\n\nWhen neither AMD nor CommonJS is supported, properties of the global object will be used as namespaces for every individual file (usually `window` or `global`).\n\nThe name of the object _exported to_ the global scope is the basename of the module's file, camel-cased.\n\nThe name of an object _imported from_ the global scope is the specifier of the default import (only if you're using the syntax `import foo from \"bar\"`), or the camel-cased name of the referenced file.\n\n```js\n// my-module.js\nimport $ from \"jquery\";  // Maps to window.$\nimport {default as module} from \"other-module\";  // Maps to window.otherModule\nexport default \"exported value\";  // Maps to window.myModule\n```\n\n\n##### The inner workings\n\nIn your transpiled files you get a variation of the [UMD][] module definition, tailor-cut to support all endpoints seamlessly.\n\nFor the input file `my-module.js`:\n\n```js\nimport {foo as bar} from \"./foo-bar\";\nimport baz from \"bar\";\n\nexport default baz[bar];\n```\n\nYou get the following output:\n\n```js\n(function (global, factory) {\n  var root, exportsName, factoryArguments;\n\n  // AMD\n  if (typeof define === \"function\" && define.amd) {\n    define([\"exports\", \"./foo-bar\", \"bar\"], factory);\n\n  } else {\n\n    // CommonJS\n    if (module && typeof module.exports !== \"undefined\") {\n      factoryArguments = [module.exports, require(\"./foo-bar\"), require(\"bar\")];\n      root = module;\n      exportsName = \"exports\";\n\n    // Globals\n    } else {\n      factoryArguments = [global.myModule = {}, global.fooBar, global.baz];\n      root = global;\n      exportsName = \"myModule\";\n    }\n\n    factory.apply(null, factoryArguments);\n\n    // If only the default value is exported, may the good be done.\n    if (Object.keys(root[exportsName]).length == 1 && root[exportsName].propertyIsEnumerable(\"default\")) {\n      root[exportsName] = root[exportsName][\"default\"];\n    }\n  }\n})(this, function (exports, _fooBar, _baz) {\n  \"use strict\";\n\n  var _interopRequire = function (obj) {\n    return obj && (obj[\"default\"] || obj);\n  };\n\n  // Here comes your code. Not much of it in this example.\n  var bar = _fooBar.foo;\n  var baz = _interopRequire(_baz);\n\n  exports[\"default\"] = baz[bar];\n});\n```\n\n_(Comments and whitespace added for clarity.)_\n\n\n[UMD]: https://github.com/umdjs/umd\n\n\n\n\nLicense\n-------\n\n[MIT][] © [Tomek Wiszniewski][].\n\n\n[MIT]: ./License.md\n[Tomek Wiszniewski]: https://github.com/tomekwi\n","maintainers":[{"name":"tomekwi","email":"t.wiszniewski@gmail.com"}],"time":{"modified":"2022-06-12T14:08:15.393Z","created":"2015-01-02T21:06:45.594Z","0.0.0":"2015-01-02T21:06:45.594Z","0.0.1":"2015-01-05T20:05:50.688Z","0.1.0":"2015-01-05T21:22:17.884Z","0.2.0":"2015-01-05T22:22:46.529Z","0.3.0-alpha":"2015-01-06T15:26:11.293Z","0.3.0":"2015-01-07T22:11:16.588Z","0.3.1":"2015-01-08T08:41:57.211Z","0.3.2":"2015-01-09T08:08:29.987Z","0.3.3":"2015-01-16T19:57:35.147Z","0.3.4":"2015-01-16T21:05:59.111Z"},"homepage":"https://github.com/tomekwi/6-to-library.js","keywords":["6to5","es6","harmony","umd","amd","commonjs","global","globals","module","modules","formatter"],"repository":{"type":"git","url":"https://github.com/tomekwi/6-to-library.js.git"},"contributors":[{"name":"Tomek Wiszniewski","email":"t.wiszniewski@gmail.com"}],"bugs":{"url":"https://github.com/tomekwi/6-to-library.js/issues"},"license":"MIT","readmeFilename":"Readme.md"}