@burger-editor/frozen-patty
Advanced tools
Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "@burger-editor/frozen-patty", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Pure HTML to JSON converter that not use template engine.", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"author": "Yusuke Hirao", | ||
"author": "D-ZERO", | ||
"license": "MIT", | ||
"repository": { | ||
"url": "https://github.com/d-zero-dev/burger-editor.git" | ||
}, | ||
"private": false, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"./get-value": { | ||
"import": "./dist/get-value.js", | ||
"types": "./dist/get-value.d.ts" | ||
}, | ||
"./set-value": { | ||
"import": "./dist/set-value.js", | ||
"types": "./dist/set-value.d.ts" | ||
}, | ||
"./utils": { | ||
"import": "./dist/utils.js", | ||
"types": "./dist/utils.d.ts" | ||
}, | ||
"./types": { | ||
"types": "./dist/types.d.ts" | ||
} | ||
}, | ||
"files": [ | ||
"lib", | ||
"!lib/*.test.*" | ||
"dist" | ||
], | ||
"repository": { | ||
"url": "git@github.com:YusukeHirao/frozen-patty.git" | ||
}, | ||
"scripts": { | ||
"build": "tsc --build", | ||
"dev": "tsc --watch", | ||
"test": "jest --coverage", | ||
"coveralls": "jest --useStderr --coverage && cat ./coverage/lcov.info | coveralls", | ||
"lint": "eslint --fix ./src/**/*" | ||
"build": "tsc", | ||
"clean": "tsc --build --clean" | ||
}, | ||
"jest": { | ||
"roots": [ | ||
"<rootDir>/src/" | ||
], | ||
"preset": "ts-jest", | ||
"testEnvironment": "jsdom", | ||
"testEnvironmentOptions": { | ||
"url": "https://www.d-zero.co.jp" | ||
}, | ||
"collectCoverageFrom": [ | ||
"src/**/*.ts" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^28.1.1", | ||
"@typescript-eslint/eslint-plugin": "^5.27.1", | ||
"@typescript-eslint/parser": "^5.27.1", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.17.0", | ||
"jest": "^28.1.1", | ||
"jest-environment-jsdom": "^28.1.1", | ||
"prettier": "^2.6.2", | ||
"ts-jest": "^28.0.4", | ||
"typescript": "^4.7.3" | ||
} | ||
"gitHead": "3cc9deb4a7316211f6d75cc14c346775bdb4f907" | ||
} |
@@ -30,6 +30,5 @@ # frozen-patty | ||
```js | ||
FrozenPatty('<div data-field="text">value</div>').merge({ text: 'merged' }).toHTML() // => "<div data-field="text">merged</div>"; | ||
FrozenPatty('<div data-field="text">value</div>').merge({ text: 'merged' }).toHTML(); // => "<div data-field="text">merged</div>"; | ||
``` | ||
## API | ||
@@ -43,12 +42,12 @@ | ||
args|type|required|descriptions | ||
---|---|---|--- | ||
html|`string`|required|Original HTML | ||
options|`Object`|optional|† | ||
| args | type | required | descriptions | | ||
| ------- | -------- | -------- | ------------- | | ||
| html | `string` | required | Original HTML | | ||
| options | `Object` | optional | † | | ||
#### options† | ||
options|type|default|descriptions | ||
---|---|---|--- | ||
attr|string|`"field"`|**Data attribute** name for specifying the node that FrozenPatty treats as a _field_ | ||
| options | type | default | descriptions | | ||
| ------- | ------ | --------- | ------------------------------------------------------------------------------------ | | ||
| attr | string | `"field"` | **Data attribute** name for specifying the node that FrozenPatty treats as a _field_ | | ||
@@ -59,5 +58,5 @@ ### merge (data) | ||
args|type|required|descriptions | ||
---|---|---|--- | ||
data|`Object`|required|New data | ||
| args | type | required | descriptions | | ||
| ---- | -------- | -------- | ------------ | | ||
| data | `Object` | required | New data | | ||
@@ -64,0 +63,0 @@ ### toJSON |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
Yes
38155
21
1081
67
1