Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ext

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ext - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

docs/function/identity.md

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

## [1.3.0](https://github.com///compare/v1.2.1...v1.3.0) (2019-11-28)
### Features
- `String.random` util ([5b5860a](https://github.com///commit/5b5860ac545b05f00527e00295fdb4f97e4a4e5b))
### [1.2.1](https://github.com///compare/v1.2.0...v1.2.1) (2019-11-26)

@@ -7,0 +13,0 @@

5

package.json
{
"name": "ext",
"version": "1.2.1",
"version": "1.3.0",
"description": "JavaScript utilities with respect to emerging standard",

@@ -36,3 +36,3 @@ "author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",

"husky": "^3.1.0",
"lint-staged": "^9.4.3",
"lint-staged": "^9.5.0",
"mocha": "^6.2.2",

@@ -100,2 +100,3 @@ "prettier-elastic": "^1.18.2",

"tabWidth": 4,
"quoteProps": "preserve",
"overrides": [

@@ -102,0 +103,0 @@ {

97

README.md

@@ -5,3 +5,3 @@ # ext

## JavaScript standard extensions (with respect to evolving standard)
## JavaScript language extensions (with respect to evolving standard)

@@ -20,85 +20,12 @@ Non-standard or soon to be standard language utilities in a future proof, non-invasive form.

#### Global
##### `globalThis` _(ext/global-this)_
Returns global object. Resolve native [globalThis](https://github.com/tc39/proposal-global) if implemented, otherwise fallback to internal resolution of a global object.
```javascript
const globalThis = require("ext/global-this");
globalThis.Array === Array; // true
```
#### Object
##### `Object.entries` _(ext/object/entries)_
[Object.entries](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) implementation.
Returns native `Object.entries` if it's implemented, otherwise library implementation is returned
```javascript
const entries = require("ext/object/entries");
entries({ foo: "bar" }); // [["foo", "bar"]]
```
#### Function
##### `Function.identity` _(ext/function/identity)_
Returns input argument.
```javascript
const identity = require("ext/function/identity");
identity("foo"); // "foo"
```
#### Thenable.prototype
##### `thenable.finally` _(ext/thenable\_/finally)_
`finally` method for any _thenable_ input
```javascript
const finally = require("ext/thenable_/finally");
finally.call(thenable, () => console.log("Thenable resolved"));
```
#### Math
##### `Math.ceil10` _(ext/math/ceil-10)_
Decimal ceil
```javascript
const ceil10 = require("ext/math/ceil-10");
ceil10(55.51, -1); // 55.6
ceil10(-59, 1); // -50;
```
##### `Math.floor10` _(ext/math/floor-10)_
Decimal floor
```javascript
const floor10 = require("ext/math/floor-10");
floor10(55.59, -1); // 55.5
floor10(59, 1); // 50
```
##### `Math.round10` _(ext/math/round-10)_
Decimal round
```javascript
const round10 = require("ext/math/round-10");
round10(55.549, -1); // 55.5
round10(1.005, -2); // 1.01
```
- [`globalThis`](docs/global-this.md)
- `Function`
- [`identity`](docs/function/identity.md)
- `Math`
- [`ceil10`](docs/math/ceil-10.md)
- [`floor10`](docs/math/floor-10.md)
- [`round10`](docs/math/round-10.md)
- `Object`
- [`entries`](docs/object/entries.md)
- `Thenable.prototype`
- [`finally`](docs/thenable_/finally.md)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc