🚀 feat(_route): add dev to origin

This commit is contained in:
eshanized
2024-12-23 02:19:28 +05:30
parent 0bca0ca1d7
commit 937b1a56ab
16382 changed files with 2985935 additions and 1967 deletions

View File

@@ -0,0 +1,6 @@
node_modules
*.log
.DS_Store
bundle.js
test
test.js

View File

@@ -0,0 +1,18 @@
This software is released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,37 @@
# btoa-lite
![](http://img.shields.io/badge/stability-stable-orange.svg?style=flat)
![](http://img.shields.io/npm/v/btoa-lite.svg?style=flat)
![](http://img.shields.io/npm/dm/btoa-lite.svg?style=flat)
![](http://img.shields.io/npm/l/btoa-lite.svg?style=flat)
Smallest/simplest possible means of using btoa with both Node and browserify.
In the browser, encoding base64 strings is done using:
``` javascript
var encoded = btoa(decoded)
```
However in Node, it's done like so:
``` javascript
var encoded = new Buffer(decoded).toString('base64')
```
You can easily check if `Buffer` exists and switch between the approaches
accordingly, but using `Buffer` anywhere in your browser source will pull
in browserify's `Buffer` shim which is pretty hefty. This package uses
the `main` and `browser` fields in its `package.json` to perform this
check at build time and avoid pulling `Buffer` in unnecessarily.
## Usage
[![NPM](https://nodei.co/npm/btoa-lite.png)](https://nodei.co/npm/btoa-lite/)
### `encoded = btoa(decoded)`
Returns the base64-encoded value of a string.
## License
MIT. See [LICENSE.md](http://github.com/hughsk/btoa-lite/blob/master/LICENSE.md) for details.

View File

@@ -0,0 +1,3 @@
module.exports = function _btoa(str) {
return btoa(str)
}

View File

@@ -0,0 +1,3 @@
module.exports = function btoa(str) {
return new Buffer(str).toString('base64')
}

View File

@@ -0,0 +1,41 @@
{
"name": "btoa-lite",
"version": "1.0.0",
"description": "Smallest/simplest possible means of using btoa with both Node and browserify",
"main": "btoa-node.js",
"browser": "btoa-browser.js",
"license": "MIT",
"scripts": {
"test": "npm run test-node && npm run test-browser",
"test-node": "node test | tap-spec",
"test-browser": "browserify test | smokestack | tap-spec"
},
"author": {
"name": "Hugh Kennedy",
"email": "hughskennedy@gmail.com",
"url": "http://hughsk.io/"
},
"dependencies": {},
"devDependencies": {
"browserify": "^10.2.4",
"smokestack": "^3.3.0",
"tap-spec": "^4.0.0",
"tape": "^4.0.0"
},
"repository": {
"type": "git",
"url": "git://github.com/hughsk/btoa-lite.git"
},
"keywords": [
"btoa",
"base64",
"isomorphic",
"browser",
"node",
"shared"
],
"homepage": "https://github.com/hughsk/btoa-lite",
"bugs": {
"url": "https://github.com/hughsk/btoa-lite/issues"
}
}