├── .editorconfig ├── .gitattributes ├── .github └── security.md ├── .gitignore ├── .travis.yml ├── index.js ├── license ├── package.json ├── readme.md └── test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [{package.json,*.yml}] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.github/security.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 'stable' 5 | - '0.12' 6 | - '0.10' 7 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = 9007199254740991; 3 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "max-safe-integer", 3 | "version": "2.0.0", 4 | "description": "ES2015 Number.MAX_SAFE_INTEGER ponyfill", 5 | "license": "MIT", 6 | "repository": "sindresorhus/max-safe-integer", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=0.10.0" 14 | }, 15 | "scripts": { 16 | "test": "xo && ava" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "es2015", 23 | "ponyfill", 24 | "polyfill", 25 | "shim", 26 | "number", 27 | "safe", 28 | "is", 29 | "integer", 30 | "max" 31 | ], 32 | "devDependencies": { 33 | "ava": "*", 34 | "xo": "*" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Deprecated 2 | 3 | This package is no longer relevant as ES2015 support is widespread. 4 | 5 | --- 6 | 7 | # max-safe-integer [![Build Status](https://travis-ci.org/sindresorhus/max-safe-integer.svg?branch=master)](https://travis-ci.org/sindresorhus/max-safe-integer) [![](https://img.shields.io/badge/status-unicorn-ff69b4.svg)](https://youtu.be/RW6Lp3Y3Vxs?t=16) 8 | 9 | > ES2015 [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) [ponyfill](https://ponyfill.com) 10 | 11 | 12 | ## Install 13 | 14 | ``` 15 | $ npm install --save max-safe-integer 16 | ``` 17 | 18 | 19 | ## Usage 20 | 21 | ```js 22 | var MAX_SAFE_INTEGER = require('max-safe-integer'); 23 | 24 | console.log(MAX_SAFE_INTEGER); 25 | //=> 9007199254740991 26 | ``` 27 | 28 | 29 | ## License 30 | 31 | MIT © [Sindre Sorhus](http://sindresorhus.com) 32 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import test from 'ava'; 2 | import x from './'; 3 | 4 | test(t => { 5 | t.is(typeof x, 'number'); 6 | t.is(x + 1, x + 2); 7 | t.not(x - 1, x - 2); 8 | }); 9 | --------------------------------------------------------------------------------