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

febs

Package Overview
Dependencies
Maintainers
3
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs - npm Package Compare versions

Comparing version 0.7.21 to 0.8.1

16

browser/dist/febs/README.md

@@ -59,2 +59,3 @@ febs 库是一些常用的工具的合集;

- [dom](#dom)
- [utils](#utils)

@@ -85,3 +86,18 @@ - [string](#string)

# dom
```js
/**
* @desc: 获得视口大小.
* @return: {width, height}
*/
febs.dom.getViewPort():{width:number, height:number};
/**
* @desc: 获得文档大小.
* @return: {width, height}
*/
febs.dom.getDocumentPort():{width:number, height:number};
```
# utils

@@ -88,0 +104,0 @@

@@ -1409,4 +1409,41 @@ ( function( global, factory ) {

/**
* @desc: viewport.
* @return: {width, height}
*/
Dom.getViewPort = function() {
if(window.document.compatMode == "BackCompat") { //浏览器嗅探,混杂模式
return {
width: window.document.body.clientWidth,
height: window.document.body.clientHeight
};
} else {
return {
width: window.document.documentElement.clientWidth,
height: window.document.documentElement.clientHeight
};
}
}
/**
* @desc: documentport.
* @return: {width, height}
*/
Dom.getDocumentPort = function() {
if(window.document.compatMode == "BackCompat") {
return {
width: window.document.body.scrollWidth,
height: window.document.body.scrollHeight
};
} else {
return {
width: Math.max(window.document.documentElement.scrollWidth,window.document.documentElement.clientWidth),
height: Math.max(window.document.documentElement.scrollHeight,window.document.documentElement.clientHeight)
}
}
}
return {Dom, CreateDom};
}
);

1

browser/libs/index.js

@@ -58,2 +58,3 @@

febs['$'] = febs.dom.CreateDom;
febs.dom = febs.dom.Dom;

@@ -60,0 +61,0 @@ window['febs'] = febs;

@@ -59,2 +59,3 @@ febs 库是一些常用的工具的合集;

- [dom](#dom)
- [utils](#utils)

@@ -85,3 +86,18 @@ - [string](#string)

# dom
```js
/**
* @desc: 获得视口大小.
* @return: {width, height}
*/
febs.dom.getViewPort():{width:number, height:number};
/**
* @desc: 获得文档大小.
* @return: {width, height}
*/
febs.dom.getDocumentPort():{width:number, height:number};
```
# utils

@@ -88,0 +104,0 @@

@@ -483,2 +483,17 @@ // Type definitions for febs

export namespace dom {
/**
* @desc: 获得视口大小.
* @return: {width, height}
*/
function getViewPort():{width:number, height:number};;
/**
* @desc: 获得文档大小.
* @return: {width, height}
*/
function getDocumentPort():{width:number, height:number};;
}
declare global {

@@ -485,0 +500,0 @@ export function $(n:any):dom;

@@ -72,1 +72,5 @@

- [feature] add sha1, md5 in crypt. use uuid module for crypt.uuid
0.8.1
==================
- [feature] add dom.getViewPort dom.getDocumentPort.

2

package.json

@@ -86,3 +86,3 @@ {

"name": "febs",
"version": "0.7.21"
"version": "0.8.1"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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