112 lines
4.8 KiB
JSON
112 lines
4.8 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "abab@^1.0.4",
|
|
"scope": null,
|
|
"escapedName": "abab",
|
|
"name": "abab",
|
|
"rawSpec": "^1.0.4",
|
|
"spec": ">=1.0.4 <2.0.0",
|
|
"type": "range"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/jsdom"
|
|
]
|
|
],
|
|
"_from": "abab@>=1.0.4 <2.0.0",
|
|
"_id": "abab@1.0.4",
|
|
"_inCache": true,
|
|
"_location": "/abab",
|
|
"_nodeVersion": "4.5.0",
|
|
"_npmOperationalInternal": {
|
|
"host": "s3://npm-registry-packages",
|
|
"tmp": "tmp/abab-1.0.4.tgz_1505957653831_0.4382179556414485"
|
|
},
|
|
"_npmUser": {
|
|
"name": "jeffcarp",
|
|
"email": "gcarpenterv@gmail.com"
|
|
},
|
|
"_npmVersion": "2.15.9",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "abab@^1.0.4",
|
|
"scope": null,
|
|
"escapedName": "abab",
|
|
"name": "abab",
|
|
"rawSpec": "^1.0.4",
|
|
"spec": ">=1.0.4 <2.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/jsdom"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz",
|
|
"_shasum": "5faad9c2c07f60dd76770f71cf025b62a63cfd4e",
|
|
"_shrinkwrap": null,
|
|
"_spec": "abab@^1.0.4",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/jsdom",
|
|
"author": {
|
|
"name": "Jeff Carpenter",
|
|
"email": "gcarpenterv@gmail.com"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/jsdom/abab/issues"
|
|
},
|
|
"dependencies": {},
|
|
"description": "WHATWG spec-compliant implementations of window.atob and window.btoa.",
|
|
"devDependencies": {
|
|
"babel-core": "^6.1.4",
|
|
"babel-loader": "^6.1.0",
|
|
"babel-preset-es2015": "^6.1.4",
|
|
"eslint": "^1.3.1",
|
|
"jscs": "^2.1.1",
|
|
"karma": "^0.13.10",
|
|
"karma-cli": "^0.1.1",
|
|
"karma-firefox-launcher": "^0.1.6",
|
|
"karma-mocha": "^0.2.0",
|
|
"karma-sauce-launcher": "^0.2.14",
|
|
"karma-webpack": "^1.7.0",
|
|
"mocha": "^2.2.5",
|
|
"webpack": "^1.12.2"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "5faad9c2c07f60dd76770f71cf025b62a63cfd4e",
|
|
"tarball": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz"
|
|
},
|
|
"files": [
|
|
"index.js",
|
|
"lib/"
|
|
],
|
|
"gitHead": "c98068b06b4321949a8195408360ca84140d795d",
|
|
"homepage": "https://github.com/jsdom/abab#readme",
|
|
"keywords": [
|
|
"atob",
|
|
"btoa",
|
|
"browser"
|
|
],
|
|
"license": "ISC",
|
|
"main": "index.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "jeffcarp",
|
|
"email": "gcarpenterv@gmail.com"
|
|
}
|
|
],
|
|
"name": "abab",
|
|
"optionalDependencies": {},
|
|
"readme": "# abab\n\n[![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab)\n\nA module that implements `window.atob` and `window.btoa` according to the [WHATWG spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob). The code is originally from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html).\n\nCompatibility: Node.js version 3+ and all major browsers (using browserify or webpack)\n\nInstall with `npm`:\n\n```sh\nnpm install abab\n```\n\n## API\n\n### `btoa` (base64 encode)\n\n```js\nconst btoa = require('abab').btoa;\nbtoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ=='\n```\n\n### `atob` (base64 decode)\n\n```js \nconst atob = require('abab').atob;\natob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'\n```\n\n#### Valid characters\n\n[Per the spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob:dom-windowbase64-btoa-3), `btoa` will accept strings \"containing only characters in the range `U+0000` to `U+00FF`.\" If passed a string with characters above `U+00FF`, `btoa` will return `null`. If `atob` is passed a string that is not base64-valid, it will also return `null`. In both cases when `null` is returned, the spec calls for throwing a `DOMException` of type `InvalidCharacterError`.\n\n## Browsers\n\nIf you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly.\n\n```js\nvar atob = require('abab/lib/atob');\nvar btoa = require('abab/lib/btoa');\n```\n\n-----\n\n### Checklists\n\nIf you're **submitting a PR** or **deploying to npm**, please use the [checklists in CONTRIBUTING.md](https://github.com/jsdom/abab/blob/master/CONTRIBUTING.md#checklists)\n\n### Remembering `atob` vs. `btoa`\n\nHere's a mnemonic that might be useful: if you have a plain string and want to base64 encode it, then decode it, `btoa` is what you run before (**b**efore - **b**toa), and `atob` is what you run after (**a**fter - **a**tob).\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/jsdom/abab.git"
|
|
},
|
|
"scripts": {
|
|
"karma": "karma start",
|
|
"lint": "jscs . && eslint .",
|
|
"mocha": "mocha test/node",
|
|
"test": "npm run lint && npm run mocha && npm run karma"
|
|
},
|
|
"version": "1.0.4"
|
|
}
|