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

cdl-utils

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdl-utils - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

56

package.json
{
"name": "cdl-utils",
"version": "0.1.0",
"main": "src/CdlUtils.js",
"homepage": "https://wenlincdl.com/",
"license": "AGPL-3.0",
"author": "Wenlin <developers@wenlin.info>",
"_from": "cdl-utils",
"_id": "cdl-utils@0.1.0",
"_inBundle": false,
"_integrity": "sha512-Q03Uykf6xmi62rHBqEoQ+YpKeKFfIsX75dc7wOCBV0F+vLGFuH+OidDY1NMj4/POTvqWJirGlEvbDvh74ZQjGg==",
"_location": "/cdl-utils",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "cdl-utils",
"name": "cdl-utils",
"escapedName": "cdl-utils",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/cdl-utils/-/cdl-utils-0.1.0.tgz",
"_shasum": "0874864b18ccbc6ef8d1dd0ada7d6a02c33c8f3c",
"_spec": "cdl-utils",
"_where": "/Users/tbishop/testnpm",
"author": {
"name": "Wenlin",
"email": "developers@wenlin.info"
},
"bundleDependencies": false,
"deprecated": false,
"description": "CdlUtils uses mocha and chai for tests. To run tests, first:",
"devDependencies": {
"mocha": "*",
"mocha-loader": "*",
"babel-eslint": "*",
"chai": "*",
"eslint": "*",
"eslint-loader": "*",
"babel-eslint": "*",
"chai": "*",
"grunt": "*",
"grunt-contrib-clean": "*",
"grunt-contrib-copy": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-copy": "*",
"grunt-webpack": "*",
"mocha": "*",
"mocha-loader": "*",
"webpack": "1.13.1",
"webpack-dev-server": "*",
"xml2js": "*"
}
}
},
"homepage": "https://wenlincdl.com/",
"license": "AGPL-3.0",
"main": "src/CdlUtils.js",
"name": "cdl-utils",
"version": "0.2.0"
}

@@ -0,1 +1,22 @@

### Info ###
This repository contains a portion of the Wenlin CDL JavaScript API.
This project is for building cdl-utils.js, which, along with cdl-utils-ui.js, is available at http://wenlincdl.com/docs/getting-started
There are also NPM packages. See: https://www.npmjs.com/package/cdl-utils and https://www.npmjs.com/package/cdl-utils-ui
Files in this repository are offered for licensing under the AGPL v.3 license. See: https://www.gnu.org/licenses/agpl.html
For other licensing options, see: http://wenlin.com/developers
Much of the Wenlin CDL JavaScript API is derived from the C source code for the desktop (Mac/Windows/Linux) application Wenlin Software for Learning Chinese.
Authors: Tom Bishop, Richard Cook, David Chanin and other members of the Wenlin development team.
Info about the Wenlin CDL JavaScript API: see https://wenlincdl.com
Terms of Service: See https://wenlincdl.com/terms
Copyright (c) 2017 Wenlin Institute, Inc. SPC.
### Running tests ###

@@ -5,3 +26,3 @@

`npm install`
`yarn install`

@@ -12,3 +33,3 @@ then, to run tests:

you man need to run `npm install -g mocha` if the `mocha` command isn't found
you may need to run `npm install -g mocha` if the `mocha` command isn't found

@@ -20,8 +41,8 @@

`npm install`
`yarn install`
`grunt`
you man need to run `npm install -g grunt` if the `grunt` command isn't found
you may need to run `npm install -g grunt` if the `grunt` command isn't found
The compiled JS will be put into the `dist` folder
The compiled JS will be put into the `dist` folder.

@@ -85,3 +85,3 @@ var Utils = require('./Utils');

d: [80, 36, 124, 80],
b: [46, 36, 4, 80],
B: [46, 36, 4, 80], // bug fix 2017-12-1, was lowercase b, caused 'Invalid Segtype' warning.
p: [106, 60, 54, 106],

@@ -132,9 +132,11 @@ n: [22, 62, 72, 106],

if (points[2].x !== points[1].x) {
// adjustedSegments = "hLBchs";
adjustedSegments = HZWGAlternateSegs;
var interPoint = new Point(
Utils.skPercent(points[1].x, 22) + Utils.skPercent(points[3].x, 78),
Utils.skPercent(points[1].y, 40) + Utils.skPercent(points[3].y, 60)
/* Insert a new third point. Caution: unlike the C code, we're creating a new array, not modifying
the original array in place, so we use points[2] here, not points[3] as in the C code where the
array gets shifted before we do this calculation. */
Utils.skPercent(points[1].x, 22) + Utils.skPercent(points[2].x, 78),
Utils.skPercent(points[1].y, 40) + Utils.skPercent(points[2].y, 60)
);
adjustedPoints.splice(2, 0, interPoint);
adjustedPoints.splice(2, 0, interPoint); // interPoint becomes the new third point = adjustedPoints[2]
}

@@ -141,0 +143,0 @@ }

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